Skip to content

Commit 635e6fa

Browse files
authored
[CI] Update sycl-check-ready-to-merge-prs.yml (#20685)
Ping gatekeepers only in PRs targeting the sycl branch. Also set default repo.
1 parent 2b96dd3 commit 635e6fa

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/sycl-check-ready-to-merge-prs.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,27 @@ jobs:
2727
days=3
2828
days_in_seconds=$((days*24*60*60))
2929
30+
gh repo set-default intel/llvm
31+
3032
# Function to ping gatekeepers and print debug info
3133
ping_gatekeepers() {
3234
pr_number=$1
33-
gh pr comment "$pr_number" --repo intel/llvm --body "@intel/llvm-gatekeepers please consider merging"
35+
gh pr comment "$pr_number" --body "@intel/llvm-gatekeepers please consider merging"
3436
echo "Pinged @intel/llvm-gatekeepers for https://github.com/intel/llvm/pull/$pr_number"
3537
}
3638
3739
# Get the list of suitable PRs
38-
prs=$(gh pr list --search "is:open review:approved draft:no status:success" --repo intel/llvm --json number --jq '.[].number')
40+
prs=$(gh pr list --search "is:open review:approved draft:no status:success" --json number --jq '.[].number')
3941
now=$(date -u +%s)
4042
for pr in $prs; do
43+
# Skip PRs that don't target the sycl branch
44+
pr_base=$(gh pr view $pr --json baseRefName -q .baseRefName)
45+
if [ "$pr_base" != "sycl" ]; then
46+
continue
47+
fi
48+
4149
# Get the timestamp of the latest comment mentioning @intel/llvm-gatekeepers
42-
latest_ts=$(gh pr view $pr --repo intel/llvm --json comments \
50+
latest_ts=$(gh pr view $pr --json comments \
4351
--jq '[.comments[] | select(.body | test("@intel/llvm-gatekeepers")) | .createdAt] | last')
4452
# If there is no previous mention, ping the gatekeepers
4553
if [[ -z "$latest_ts" ]]; then

0 commit comments

Comments
 (0)