Skip to content

Commit 2fc64b1

Browse files
committed
596: title not found change
596: testing workflow change 596: testing workflow change using status indicator 596: changed output message 596: ensure we have failure check 596: comment fix 596: comment modification 596: comment modification 596: changed output message 596: reverted period change
1 parent 30c7d7b commit 2fc64b1

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/composite/check-notion-commits/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ runs:
6262
if: steps.verify.outcome == 'failure'
6363
shell: bash
6464
run: |
65-
echo "One or more commits do not match the Notion ID"
65+
echo "One or more commits do not match the Notion ID."
6666
exit 1

.github/composite/check-notion-pr/action.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ runs:
4242
set -euo pipefail
4343
4444
TITLE="$(gh pr view "${{ inputs.PR_ID }}" --json title -q .title)"
45-
PREFIX="$(echo "$TITLE" | grep -oE '^-?[0-9]+')"
45+
PREFIX="$(echo "$TITLE" | grep -oE '^-?[0-9]+' || true)"
4646
4747
if [ -z "$PREFIX" ]; then
4848
echo "No numeric prefix found in PR title: $TITLE" >&2
49+
echo "status=failed" >> "$GITHUB_OUTPUT"
4950
exit 1
5051
fi
5152
@@ -167,6 +168,18 @@ runs:
167168
message: |
168169
Task ID ${{ steps.parse_id.outputs.id || 'N/A'}} does not exist on Notion. Please set a valid Notion task ID to the start of the PR title.
169170
171+
- name: Send a message to the PR if title does not have number prefix
172+
if: failure() && steps.parse_id.outcome == 'failure'
173+
uses: ./.github/composite/send-message
174+
with:
175+
prId: ${{ inputs.PR_ID }}
176+
message: |
177+
## TITLE ID REQUIRED
178+
179+
Please add the ID of your Notion ticket to the title of the PR.
180+
181+
**Example:** `420: Foo Bar`
182+
170183
- name: Fail if task does not exist
171184
if: steps.check_notion.outputs.found == 'false'
172185
shell: bash

0 commit comments

Comments
 (0)