forked from Velocet/iown-homecontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto Label new PRs
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Sorry, something went wrong. |
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.