Skip to content

Release v4.7.3

Release v4.7.3 #491

---
name: Labeller (content-based)
"on":
workflow_call:
inputs:
extra-rules:
description: 'YAML describing the additional labelling rules respecting the github/issue-labeler dialect'
required: false
type: string
issues:
types: [opened]
pull_request:
types: [opened]
concurrency:
# Group workflow jobs so new commits cancels in-progress execution triggered by previous commits.
# Source: https://mail.python.org/archives/list/pypa-committers@python.org/thread/PCBCQMJF64JGRBOX7E2EE4YLKHT4DI55/
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
labeller:
name: Content-based issue & PR labeller
# Skip labelling:
# 1. On prepare-release branch as it points to a tagged URL that does not exist yet.
# 2. If PR was created/triggered by a bot. That way we can prevent content-rich PRs (like those produced by
# dependabot) to be overly tagged with extra labels.
if: >
github.head_ref != 'prepare-release'
&& github.event.sender.type != 'Bot'
&& github.actor != 'dependabot[bot]'
&& github.actor != 'dependabot-preview[bot]'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.2.2
- name: Download default rules
run: >
curl -fsSL --output ./.github/labeller-content-based.yaml
https://raw.githubusercontent.com/kdeldycke/workflows/main/.github/labeller-content-based.yaml
- name: Extend default rules
if: inputs.extra-rules
run: |
tee -a ./.github/labeller-content-based.yaml <<-EOF
${{ inputs.extra-rules }}
EOF
- name: Print all rules
run: |
cat ./.github/labeller-content-based.yaml
- name: Apply rules
uses: github/issue-labeler@v3.4
with:
configuration-path: ".github/labeller-content-based.yaml"
enable-versioned-regex: 0
include-title: 1