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

Only consider commits that come before commitish? #1053

Closed
mikeroll opened this issue Feb 3, 2022 · 1 comment · Fixed by #1065
Closed

Only consider commits that come before commitish? #1053

mikeroll opened this issue Feb 3, 2022 · 1 comment · Fixed by #1065

Comments

@mikeroll
Copy link
Contributor

mikeroll commented Feb 3, 2022

As I understand right now, only branch names are properly supported as values for commitish, having something like a commit sha there does not yield expected results. This is basically a suggestion to support at least commit hashes there (and by extension perhaps everything else?).

Imagine a master branch with commits A -> B -> C (HEAD) (all of them PR merge commits to keep it simple), and a workflow for that branch which is roughly "test -> build -> run release-drafter". Each of the commits triggers this workflow, and runs for successive commits are not concurrent.
So if the workflow for B is running, and C is merged meanwhile, I would still like release-drafter to:

  • create/update the release targeting commit B, since that's what's tested and built so far. Using commitish: ${{ github.sha }} works great for creating and Update target_commitish when updating a release #1052 enables the same for updating.
  • include only A and B in the release notes. Instead, C is also included even though it's not yet "ready", and as I understand there's currently no way to tell it otherwise.

Does this make any sense? :)

Having poked around the code a little I am tempted to try something like after = commitish in this query:
https://github.com/release-drafter/release-drafter/blob/master/lib/commits.js#L20
But I wonder if I'm thinking in the right direction.

@jetersen
Copy link
Member

jetersen commented Feb 3, 2022

@mikeroll you should be able to make the changes and have your github action point to your repo/branch and test it out, I would be happy to see releases from this action.
Create a sample repo with some basic setup and play with tags and PRs?

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