git-pr-release
git-pr-release copied to clipboard
Aggregate labels from merged pull requests
@onk @motemen
Issue
Closes #54
Changes
As described in https://github.com/x-motemen/git-pr-release/issues/54, I added aggregate_labels feature.
- Add
pr-release.aggregate_labelsconfig (orGIT_RELEASE_PR_AGGREGATE_LABELS).- It accepts boolean-ish value:
"true"or anything - Only when it is
"true",git-release-praggregates labels from merged pull requests.
- It accepts boolean-ish value:
- What if
pr-release.labelsis given at the same time?- Merge aggregated labels and
pr-release.labelssetting.pr-release.labels=foo,barand aggregated labels arebaz, then labels would be["foo", "bar", "baz"].
- Merge aggregated labels and
Testing
That worked well on my own
$ GIT_PR_RELEASE_BRANCH_STAGING=release GIT_PR_RELEASE_LABELS=release GIT_PR_RELEASE_AGGREGATE_LABELS=true bundle exec git-pr-release
| Merged PRs have labels | Created PR has labels |
|---|---|
![]() |
![]() |
Review Points
- Is
aggregate_labelsan appropriate name?- ideas:
reuse_labels,summarize_labels... etc.
- ideas:
- Should
aggregate_labelsbe given as a command line arg, not environment variable or git config?- As like
--dry-run,--no-fecth,aggregate_labelsis boolean-ish value. So I wonder if it should be. (It depends on this gem's command line design.)
- As like

