Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/label-pr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Set / Validate PR Labels
on:
pull_request_target:
pull_request:
branches:
- main
types:
Expand All @@ -22,8 +22,9 @@ jobs:
name: Ensure Minimal Semver Labels
runs-on: ubuntu-24.04
permissions:
issues: read # read the issue's current labels
pull-requests: read # read the pull request's metadata
contents: read # check out the repository to determine which files changed
issues: write # add the semver label
pull-requests: write # update the pull request's labels
steps:
- name: Check Minimal Semver Labels
uses: mheap/github-action-required-labels@23e10fde7e062233401931a0eece796cd9bf3177 # v5.6.0
Expand All @@ -35,7 +36,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Auto-label Semver
if: ${{ failure() }}
# Pull requests from forks receive a read-only token, so they cannot be
# auto-labeled. A maintainer must add the label to those pull requests.
if: ${{ failure() && github.event.pull_request.head.repo.full_name == github.repository }}
uses: paketo-buildpacks/github-config/actions/pull-request/auto-semver-label@main
env:
GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading