Skip to content

Commit 51d9c75

Browse files
committed
add author of a pr as assignee
1 parent 9ee49eb commit 51d9c75

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Run `tox`
77
- Close stale PRs
88
- Check for offensive language
9+
- Assigns the PR to the author
910

1011
### On user action
1112
- Add to or remove a label from PR; supported labels: `wip`, `lgtm`, `verified`, and `hold`.
@@ -23,7 +24,6 @@
2324

2425
## To be added
2526
- Block merging if not all defined checks pass. For example: a `verified` label was added and at least 2 approvals.
26-
- When a PR is opened, assign the PR to the PR owner
2727
- When a PR is opened, add reviewers (requires updates to OWNERS file(s))
2828
- When a PR is reviewed/commented by a user who's not the PR owner, add `reviewed|commented|approved-by-<username>` label
2929
- When a PR is ready to be merged (all checks passed), add `ready-to-merge` label

.github/workflows/scripts/pr_workflow.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def run_pr_label_action(self) -> None:
115115
self.add_remove_pr_labels()
116116

117117
if self.action == self.SupportedActions.welcome_comment_action_name:
118-
self.add_welcome_comment()
118+
self.add_welcome_comment_set_assignee()
119119

120120
def get_pr_size(self) -> int:
121121
additions: int = 0
@@ -294,8 +294,9 @@ def issue_comment_label_actions(
294294
if commented_by_label not in self.pr_labels:
295295
self.add_pr_label(label=commented_by_label)
296296

297-
def add_welcome_comment(self) -> None:
297+
def add_welcome_comment_set_assignee(self) -> None:
298298
self.pr.create_issue_comment(body=WELCOME_COMMENT)
299+
self.pr.add_to_assignees(self.pr.user.login)
299300

300301

301302
def main() -> None:

0 commit comments

Comments
 (0)