Skip to content

Commit

Permalink
🔄 synced local '.github/workflows/' with remote 'template_workflows/p…
Browse files Browse the repository at this point in the history
…roject_automation/'
  • Loading branch information
surchs committed Mar 21, 2024
1 parent 16a6be0 commit 7e00e32
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/handle_external_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Label pull requests from forks

on:
pull_request:
types: [opened]

jobs:
handle_external_pr:
# Only run this entire workflow if the PR was opened from a forked repo
# The reasoning is that both bots and external contributors have to make
# a fork of the repo before they can open a PR because they don't have
# write access to the repo.
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest

steps:
- name: Label pull request with "_community"
run: gh pr edit ${{ github.event.pull_request.number }} --add-label "_community"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}

0 comments on commit 7e00e32

Please sign in to comment.