Skip to content

Commit

Permalink
ci(devops): 🧑‍💻 add action to assign PR to creator (#3)
Browse files Browse the repository at this point in the history
## Description

These changes are so we don't have to do it manually.

Related to rostools/git4cats#18 but doesn't close it since we need
a `sync` workflow as well to add it to the remaining repositories.

## Reviewer Focus

This PR needs an in-depth review.

---------

Co-authored-by: Luke W. Johnston <[email protected]>
  • Loading branch information
signekb and lwjohnst86 authored Sep 13, 2024
1 parent 82f6551 commit 81876a3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/assign-pr-to-creator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Assign PR to creator

on:
pull_request:
types:
- reopened
- opened

permissions:
pull-requests: write

jobs:
assign-pr-to-creator:
name: Assign PR to creator
runs-on: ubuntu-latest
steps:
- name: Assign PR to creator
if: ${{ github.event_name == 'pull_request' }}
run: |
gh pr edit $PR --add-assignee $AUTHOR
env:
AUTHOR: ${{ github.event.pull_request.user.login }}
PR: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 81876a3

Please sign in to comment.