-
-
Notifications
You must be signed in to change notification settings - Fork 4
INFRA-2867-Fix workflow inputs to allow branch name #108
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
Conversation
Signed-off-by: Pavel Dvorkin <pavel.dvorkin@consensys.net>
|
Thank you for this PR @XxdpavelxX! I find the code a bit difficult to follow, mainly because of some variable names. Not necessarily the ones you introduced, but some that were already in use and don’t clearly reflect what the variables represent.
Also, still in terms of variable naming, what is In terms of logging, I see you log something when the Could we also log something when it's not the case? Such as: Finally, I think it would be helpful to comment the code with a few sentences explaining why we need this change, why we need it only when the reference is a branch name, what happened in the |
Fixes made. Also DIFF_BASE is the “base” git ref used for the left side of the diff when collecting commits to put in commits.csv (the right side being release_branch). It’s the git ref to compare against when listing commits for the release. If that’s a branch name, it’s resolved to origin/; if it’s a tag or SHA, it’s used as-is. |
Signed-off-by: Pavel Dvorkin <pavel.dvorkin@consensys.net>
7004b0c to
3dcd328
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @XxdpavelxX , almost looks good to me. I made a few last suggestions, mainly to comment the code.
Signed-off-by: Pavel Dvorkin <pavel.dvorkin@consensys.net>
0a66fb5 to
d036fbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We'll have to import these changes in Extension and Mobile repos. While doing so, we'll have to think of renaming previous-version-tag into previous-version-ref, as it's a breaking change.
Ticket: https://consensyssoftware.atlassian.net/browse/INFRA-2867
The Github Action is supposed to accept 3 kind of references as inputs: branch name, tag, commit hash. However, it doesn’t work with branch names. To fix this, we should check the format of the references passed to filterCommitsByTeam function in github-tools repo, detect if the reference is a branch name, and if so, prefix it with origin/. Otherwise the Github Action can’t find the branch. Additionally we should check if the branch exists before calling filterCommitsByTeam function (or at the beginning of the function) and throw appropriate error message if it doesn’t.
This PR adds branch name as a possible input for Previous release version reference in Create Release Pull Request Workflow
Tested here: https://github.com/consensys-test/metamask-extension-test-workflow2/actions/runs/17220284141/job/48854743844