Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Cider in a team that has multiple developers #78

Open
Schamppu opened this issue Jul 31, 2024 · 3 comments
Open

Using Cider in a team that has multiple developers #78

Schamppu opened this issue Jul 31, 2024 · 3 comments

Comments

@Schamppu
Copy link

Hello! I'm using Cider, and we got two devs on the team.

I would love if Cider would allow us to either:

  • Allow generating files for each unreleased change (added, fixed, etc.) which are deleted and merged together when doing "cider release" to the actual CHANGELOG.md.
  • Setting custom path for the files, so that they can be in a subfolder instead of needing to be in the same path if pubspec.

Currently, we both work on different branches, but when we merge the branches having unreleased changes always creates a merge conflict we need to deal with. Having these features would make each change its own file before making a release, and we could set these changes to a subfolder so it doesn't look as messy.

@Schamppu
Copy link
Author

Schamppu commented Sep 5, 2024

Hey @f3ath anything new on this regard?

@f3ath
Copy link
Owner

f3ath commented Sep 6, 2024

I understand the conflict happens in the "Unreleased" section when a feature branch get merged into "main". I also assume that you have some sort of automation in place which runs "cider release" from the main branch after the feature branches are merged.

In this case the most straightforward approach I can imagine is to delegate the compilation of the release section to a simple bash script. You can designate a special folder for the devs to add feature-specific release notes as separate files which then will be iterated and added into the changelog with something as simple as

#!/usr/bin/env bash
categories=( "added" "changed" "deprecated" "removed" "fixed" "security" )
for category in "${categories[@]}" ; do
  for file in $(find "release_notes/$category" -name "*.md" | sort) ; do
    cider log "$category" "$(cat "$file")"
    rm $file
  done
done

The folder will look like this:

-release_notes
 |-added
 | |-feature1.md
 | |-feature2.md
 | `-feature3.md
 |-changed
 | |-feature3.md
 | |-feature1.md
 | `-feature2.md
 ...
 `-fixed
   `-feature1.md

@f3ath
Copy link
Owner

f3ath commented Sep 6, 2024

For more complex scenarios you might want to use change directly to modify the changelog before calling cider release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants