Skip to content

Commit

Permalink
actions: Combine PR labeling jobs into a single workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ColorfulRhino committed Jun 9, 2024
1 parent ce73634 commit 1129cf4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 29 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: "Automatic Labeler"
name: "Automatic Pull Request Labeling"
#
# Set labels for pull requests automatically based on size (modified via job 'label-size') and file categories (modified via .github/labeler)
#

on:
- pull_request_target

permissions:
contents: read

jobs:

triage:
label-category:
permissions:
contents: read # for actions/labeler to determine modified files
pull-requests: write # for actions/labeler to add labels to PRs
Expand All @@ -17,3 +18,21 @@ jobs:
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

label-size:
permissions:
contents: read # for pascalgn/size-label-action to determine modified files
pull-requests: write # for pascalgn/size-label-action to add labels to PRs
runs-on: ubuntu-latest
steps:
- name: size-label
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
sizes: >
{
"0": "small",
"50": "medium",
"250": "large"
}
24 changes: 0 additions & 24 deletions .github/workflows/pr-size-labeler.yml

This file was deleted.

0 comments on commit 1129cf4

Please sign in to comment.