Skip to content

VAULT-17736 Add GHA to add community contributed label if coming from a fork #2

VAULT-17736 Add GHA to add community contributed label if coming from a fork

VAULT-17736 Add GHA to add community contributed label if coming from a fork #2

name: Add community contributed label
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
# Runs on PRs to main
branches:
- main
jobs:
add-community-contributed-label:
# Only run if this is coming from a fork of Vault
if: ${{ github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: add label
uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf #v1.1.3
with:
labels: community-contributed-pr
github_token: ${{secrets.GITHUB_TOKEN}}