Fetch live PR title in pr-title-check CI workflow.
Code Quality Pipeline / code-quality (pull_request) Successful in 24s
Test Python Package / integration-tests (pull_request) Successful in 1m18s
Test Python Package / unit-tests (pull_request) Successful in 1m24s
Test Python Package / coverage-report (pull_request) Successful in 12s
PR Title Check / check-title (pull_request) Successful in 6s
Code Quality Pipeline / code-quality (pull_request) Successful in 24s
Test Python Package / integration-tests (pull_request) Successful in 1m18s
Test Python Package / unit-tests (pull_request) Successful in 1m24s
Test Python Package / coverage-report (pull_request) Successful in 12s
PR Title Check / check-title (pull_request) Successful in 6s
Rerunning the job now reads the current title from the Gitea API instead of the stale pull_request event payload. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
co-authored by
Cursor
parent
8c34534187
commit
9a800bf553
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Fetch the current PR title from the Gitea API.
|
||||
# Requires: API_URL, REPO_OWNER, REPO_NAME, PR_NUMBER, CI_RUNNER_TOKEN
|
||||
|
||||
: "${API_URL:?API_URL is required}"
|
||||
: "${REPO_OWNER:?REPO_OWNER is required}"
|
||||
: "${REPO_NAME:?REPO_NAME is required}"
|
||||
: "${PR_NUMBER:?PR_NUMBER is required}"
|
||||
: "${CI_RUNNER_TOKEN:?CI_RUNNER_TOKEN is required}"
|
||||
|
||||
curl -sf \
|
||||
"${API_URL}/repos/${REPO_OWNER}/${REPO_NAME}/pulls/${PR_NUMBER}" \
|
||||
-H "Authorization: token ${CI_RUNNER_TOKEN}" \
|
||||
| python3 -c 'import json, sys; print(json.load(sys.stdin)["title"])'
|
||||
Reference in New Issue
Block a user