cider
cider copied to clipboard
Using Cider in a team that has multiple developers
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.
Hey @f3ath anything new on this regard?
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
For more complex scenarios you might want to use change directly to modify the changelog before calling cider release.