Skip to content

Commit

Permalink
Create label.yml
Browse files Browse the repository at this point in the history
Auto Label new PRs
  • Loading branch information
Velocet committed Apr 26, 2024
1 parent 2632b2c commit 78e11de
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# yaml-language-server: $schema=https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/github-workflow.json

# This workflow will triage PRs and apply a label based on the paths that are modified in the PR.
#
# To use this workflow, you will need to set up a .github/labeler.yml: https://github.com/actions/labeler

name: "PR Labeler"
on: [pull_request_target]

jobs:
labeler:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- id: label-the-PR
uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

# - id: run-frontend-tests
# if: contains(steps.label-the-PR.outputs.all-labels, 'tests')
# run: |
# echo "Running tests..."
# # Put your commands for running tests here

This comment has been minimized.

Copy link
@ST-DDT

ST-DDT Jun 20, 2024

FYI: Using the action like in the example would make you vulnerable to pwn requests

The current run-nothing example is safe, but running anything in there that uses the source code is dangerous as it uses elevated permissions.
I'll recommend rewriting/removing the example or raising awareness by adding a comment.

0 comments on commit 78e11de

Please sign in to comment.