Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions .github/actions/label-sync/copy-linked-issue-labels/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ set -euo pipefail
title="$(jq -r '.pull_request.title // ""' "${GITHUB_EVENT_PATH}")"
body="$(jq -r '.pull_request.body // ""' "${GITHUB_EVENT_PATH}")"
pull_request_number="$(jq -r '.pull_request.number // ""' "${GITHUB_EVENT_PATH}")"
issue_number="$(
printf '%s %s\n' "${title}" "${body}" \
| grep -oiE '(closes|fixes|resolves|addresses)\s+#[[:digit:]]+' \
| grep -oE '#[[:digit:]]+' \
| head -1 \
| tr -d '#'
)"
issue_number=''

linked_issue_pattern='(closes|fixes|resolves|addresses)[[:space:]]+#([[:digit:]]+)'

if [[ "${title} ${body}" =~ ${linked_issue_pattern} ]]; then
issue_number="${BASH_REMATCH[2]}"
fi

if [ -z "${issue_number}" ]; then
echo "No linked issue was found in the pull request title or body."
Expand Down
2 changes: 1 addition & 1 deletion .github/wiki
Submodule wiki updated from d6fbde to 7211e3
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Keep the packaged pull-request label-sync action from failing when a PR does not reference any linked issue (#157)

## [1.17.0] - 2026-04-22

### Added
Expand Down
Loading