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

filter releases to consider only the target branch #657

Merged
merged 1 commit into from Oct 19, 2020

Conversation

fujifish
Copy link
Contributor

@fujifish fujifish commented Oct 2, 2020

Consider only releases targeting the same branch as the branch being used for the drafting the new release.
Releases that are for other branches will not be considered for the calculation for the changes.

This also possibly addresses #656

@jeacott1
Copy link

@fujifish , maybe this can help? -
I'm doing something similar, generating and updating a draft release everytime a PR receives a push event - using a different github action though.
the naming scheme I'm using is v${maven-semver}-${pullrequest-id}, and I limit activity on that PR to the same branch name (because otherwise other branches that might happen to have the same git sha pushed to them, but with no associated PR will also trigger :( ) - does anyone else think github actions are a bit of a mess?

in my case adding something like this mostly works and I think should work for drafter too (on merge the PR is already closed so you'll need to account for that by allowing finding of closed PRs):

from a push event
using 8BitJonny/gh-get-current-pr in a previous step to find the related PR from the current sha

-name: drafter
 if: ${{ steps.PR.outputs.number && (steps.PR.outputs.pr != '') && fromJson(steps.PR.outputs.pr).head.ref == env.GITHUB_REF_NAME }}
 uses: release-drafter/release-drafter@v5
 ...

Copy link
Member

@jetersen jetersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to solve an issue with supporting multiple releases.

@mkurz
Copy link
Contributor

mkurz commented Mar 24, 2021

This seems to solve an issue with supporting multiple releases.

Yes it does. I wrote a howto with my experience setting up release drafter for multiple branches: #656 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants