Skip to content

Labelling pull request with module tags based on changed files in the PR #2826

Labelling pull request with module tags based on changed files in the PR

Labelling pull request with module tags based on changed files in the PR #2826

# This file defines the workflow for labeling pull requests with module tags based on the changed files in the PR.
# It uses the `actions/labeler` GitHub Action to achieve the same.
#
# The workflow is triggered on the `pull_request_target` event which ensures workflow is only run from the master branch.
# The job `labeler` runs on `ubuntu-latest` and has permissions to read contents and write pull requests.
#
# For more information on the `actions/labeler` GitHub Action, refer to https://github.com/actions/labeler
name: "Pull Request Labeler"
run-name: Labelling pull request with module tags based on changed files in the PR
on:
# see labeler docs for explanation
# zizmor: ignore[dangerous-triggers]
- pull_request_target
permissions: {}
jobs:
labeler:
name: Label PRs
# only run on the main Lucene repository.
if: (github.repository == 'apache/lucene')
permissions:
contents: read # likely not needed for public repository
pull-requests: write # manipulate existing labels
runs-on: ubuntu-latest
steps:
- name: Run Labeler action
uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
with:
sync-labels: true