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

ci: auto-assign milestones to pull requests #1301

Merged
merged 4 commits into from
Nov 20, 2023
Merged

Conversation

lidavidm
Copy link
Member

Fixes #1296.

@lidavidm
Copy link
Member Author

Demo: lidavidm#6

@lidavidm lidavidm added this to the ADBC Libraries 0.9.0 milestone Nov 15, 2023
@lidavidm lidavidm marked this pull request as ready for review November 15, 2023 21:39
@lidavidm
Copy link
Member Author

CC @kou, what do you think?

Copy link
Member

@kou kou left a 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/milestone.sh Outdated Show resolved Hide resolved
@@ -38,6 +38,7 @@ jobs:
persist-credentials: false

- name: Check title for Conventional Commits format
continue-on-error: true
Copy link
Member

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...

Copy link
Member Author

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}"
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

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.

@lidavidm lidavidm marked this pull request as draft November 15, 2023 23:25
@lidavidm
Copy link
Member Author

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 gh-1296 that trip the regex looking for the maint branch.)

@lidavidm lidavidm marked this pull request as ready for review November 16, 2023 14:41
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

.github/workflows/dev_pr/milestone.sh Outdated Show resolved Hide resolved
.github/workflows/dev_pr/milestone.sh Outdated Show resolved Hide resolved
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
@lidavidm lidavidm merged commit 2ef0d20 into apache:main Nov 20, 2023
2 checks passed
@lidavidm lidavidm deleted the gh1296 branch November 20, 2023 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ci: add pipeline that fails PR until a milestone is assigned
3 participants