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

[stable-2.15] Backport pr_labeler changes #1917

Merged
merged 9 commits into from
Sep 20, 2024

Conversation

gotmax23
Copy link
Collaborator

This backports all the changes to the pr_labeler from devel, including the latest re-architecture.

gotmax23 and others added 9 commits September 18, 2024 13:10
This adds a warning message when PRs are created that edit
porting_guides by someone outside of the Release Management WG. These
files are automatically generated during the ansible release process and
should not be modified.

Fixes: ansible#503
(cherry picked from commit d2e6625)
Instead of hardcoding the list of release managers, we can use the
Github API to retrieve the members of the
`@ansible/release-management-wg` team.

(cherry picked from commit dddfd7e)
For example, patchback is not a release manager, but we still want it to
backport Porting Guide PRs.

(cherry picked from commit 746662c)
Co-authored-by: Sandra McCann <[email protected]>
(cherry picked from commit 95ece7e)
* pr_labeler: add GlobalArgs.full_repo property

* pr_labeler: refactor new_contributor_welcome code

As of ansible#69, the
pr_labeler responds with a welcome message when an issue or PR is opened
by a new contributor. It turns out this never actually worked properly.

The previous method that relied on Github's `author_association` flag
did not work with the app token that the pr_labeler uses. This refactors
the code to figure out whether a user is a new contributor by
searching the list of issues and PRs.

Fixes: ansible#204

* pr_labeler: address potential race condition

(cherry picked from commit 763815d)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

(cherry picked from commit 466b1fd)
This commit reorganizes the issue/PR triager script and updates the
workflow to run more efficiently.

- Make the script a proper Python package instead of an unwieldy single
  file
- Use locked dependencies and UV to decrease workflow runtime to under
  10 seconds.

(cherry picked from commit 7138e42)
(cherry picked from commit 1cf9f79)
@gotmax23 gotmax23 marked this pull request as ready for review September 18, 2024 18:12
@gotmax23 gotmax23 requested a review from oraNod September 18, 2024 18:13
Copy link
Contributor

@oraNod oraNod left a comment

Choose a reason for hiding this comment

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

Thanks again @gotmax23

@oraNod oraNod merged commit 3ca9187 into ansible:stable-2.15 Sep 20, 2024
8 checks passed
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.

2 participants