Skip to content

Commit

Permalink
Add GitHub action to auto-assign and label pull requests
Browse files Browse the repository at this point in the history
Add a new GitHub action to auto-assign pull requests to the creator and label them with `gssoc-ext`.

* Create `.github/workflows/auto-assign-label-pr.yml` file
* Define the name of the action as "Auto Assign and Label PR"
* Trigger the action on `pull_request_target` event with `types: [opened]`
* Use `actions-ecosystem/[email protected]` to add the `gssoc-ext` label
* Use `actions-ecosystem/action-assign@v1` to assign the pull request to the creator

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/swaraj-das/Collect-your-GamingTools?shareId=XXXX-XXXX-XXXX-XXXX).
  • Loading branch information
AnitSarkar123 committed Oct 16, 2024
1 parent d9c1916 commit f85d09d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/auto-assign-label-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Auto Assign and Label PR

on:
pull_request_target:
types: [opened]

permissions:
issues: write
pull-requests: write

jobs:
assign-and-label:
runs-on: ubuntu-latest

steps:
- name: Add Labels to PR
uses: actions-ecosystem/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: gssoc-ext

- name: Assign PR to Creator
uses: actions-ecosystem/action-assign@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
assignees: ${{ github.actor }}

0 comments on commit f85d09d

Please sign in to comment.