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

Auto assign PR to author #16969

Open
wants to merge 6 commits into
base: branch-24.12
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Auto Assign PR"
Matt711 marked this conversation as resolved.
Show resolved Hide resolved

on:
pull_request_target:
types:
- opened
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe on reopen too? Anything else?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe edited too? If a second person starts pushing to the PR then we can make them both share ownership. The one caveat is that it might get messy with people merging upstream, but if there isn't an easy way to avoid that I think adding them is better than not. WDYT @Matt711 and @bdice?

Copy link
Contributor Author

@Matt711 Matt711 Oct 25, 2024

Choose a reason for hiding this comment

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

Maybe edited too? If a second person starts pushing to the PR then we can make them both share ownership.

From the documentation, edited means

The title or body of a pull request was edited, or the base branch of a pull request was changed.

whereas synchronize means

A pull request's head branch was updated. For example, the head branch was updated from the base branch or new commits were pushed to the head branch.

So we might want synchronize over edited.

The one caveat is that it might get messy with people merging upstream, but if there isn't an easy way to avoid that I think adding them is better than not.

Since the commit message is always something like Merge {latest branch} into {current branch}, we might be able to not run the job when we get this message (I'm not sure how to do this though.)

- reopened
- synchronize

jobs:
add_assignees:
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-add-assignees@v1
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
assignees: ${{ github.actor }}
1 change: 1 addition & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: "Pull Request Labeler"

on:
- pull_request_target

Expand Down
Loading