Skip to content
Open
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
6 changes: 6 additions & 0 deletions .github/workflows/comment-to-trigger-teamcity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ jobs:
# Matches .sh files under regression-test/pipeline/ but excludes files under conf/ subdirectories.
source regression-test/pipeline/common/github-utils.sh
if [[ ! -f all_files ]]; then
echo "WARNING: all_files not found (GitHub API call likely failed in previous step)."
echo "Skipping sensitive check — previous step already defaulted to trigger-all."
exit 0
fi
changed_sensitive=false
while IFS= read -r f; do
if [[ "${f}" == regression-test/pipeline/*.sh ||
Expand Down
5 changes: 4 additions & 1 deletion regression-test/pipeline/common/github-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ _get_pr_changed_files_count() {
while [[ ${try_times} -gt 0 ]]; do
set -x
if ret=$(
curl -s -H "Accept: application/vnd.github+json" \
curl -s \
-H "Accept: application/vnd.github+json" \
${GITHUB_TOKEN:+-H "Authorization: Bearer ${GITHUB_TOKEN}"} \
https://api.github.com/repos/"${OWNER}"/"${REPO}"/pulls/"${PULL_NUMBER}" | jq -e '.changed_files'
); then
set +x
Expand Down Expand Up @@ -169,6 +171,7 @@ _get_pr_changed_files() {
set -x
if curl -s \
-H "Accept: application/vnd.github+json" \
${GITHUB_TOKEN:+-H "Authorization: Bearer ${GITHUB_TOKEN}"} \
https://api.github.com/repos/"${OWNER}"/"${REPO}"/pulls/"${PULL_NUMBER}"/files?page="${page}"\&per_page="${per_page}" \
>>"${file_name}"; then
set +x
Expand Down
Loading