The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/.github/workflows/pr-external-labelling.yml

25 lines
857 B

name: External PR labelling
on:
# We need "write" permissions on the PR to be able to add a label.
pull_request_target: # zizmor: ignore[dangerous-triggers] We need this to have labelling permissions. There are no user inputs here, so we should be fine.
types:
- opened
permissions: {}
jobs:
label-if-external:
name: Add 'pr/external' label if the PR is external
if: github.event.pull_request.author_association != 'MEMBER' && github.event.pull_request.author_association != 'OWNER'
runs-on: ubuntu-latest
permissions:
pull-requests: write # to write the label
steps:
- name: Add the 'pr/external' label
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
echo "Adding 'pr/external' label to the PR"
gh pr edit "$PR_NUMBER" --add-label pr/external