-
Notifications
You must be signed in to change notification settings - Fork 83
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
ci: auto-assign milestones to pull requests #1301
Conversation
Demo: lidavidm#6 |
CC @kou, what do you think? |
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.
This will be helpful!
.github/workflows/dev_pr.yml
Outdated
@@ -38,6 +38,7 @@ jobs: | |||
persist-credentials: false | |||
|
|||
- name: Check title for Conventional Commits format | |||
continue-on-error: true |
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.
If we add this, this workflow may not report an error with unexpected title...
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.
It currently reports an error via a comment, though I'd like to change that (#1294). But you're right, it looks like the right way to do this is if: always()
echo "Latest tagged version: ${latest_version}" | ||
echo "Assigning milestone: ${milestone}" | ||
|
||
gh pr edit "${pr_number}" -m "${milestone}" |
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.
This may override already assigned milestone. Is it intentional?
If it's not intentional, we may want to assign a milestone only when the PR isn't assigned to any milestone.
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.
Ah, good point. Maybe it would be best to only run this post-merge: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-pull_request-workflow-when-a-pull-request-merges
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.
Though we don't have to do that, and we can just only assign a milestone if one isn't already assigned.
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Updated. Demo: https://github.com/lidavidm/arrow-adbc/actions/runs/6892276485/job/18749174958?pr=7 (It gets a little confused on my fork because I have branches like |
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.
+1
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Fixes #1296.