Skip to content
Merged
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: 11 additions & 3 deletions .github/workflows/sycl-check-ready-to-merge-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,27 @@ jobs:
days=3
days_in_seconds=$((days*24*60*60))

gh repo set-default intel/llvm

# Function to ping gatekeepers and print debug info
ping_gatekeepers() {
pr_number=$1
gh pr comment "$pr_number" --repo intel/llvm --body "@intel/llvm-gatekeepers please consider merging"
gh pr comment "$pr_number" --body "@intel/llvm-gatekeepers please consider merging"
echo "Pinged @intel/llvm-gatekeepers for https://github.com/intel/llvm/pull/$pr_number"
}

# Get the list of suitable PRs
prs=$(gh pr list --search "is:open review:approved draft:no status:success" --repo intel/llvm --json number --jq '.[].number')
prs=$(gh pr list --search "is:open review:approved draft:no status:success" --json number --jq '.[].number')
now=$(date -u +%s)
for pr in $prs; do
# Skip PRs that don't target the sycl branch
pr_base=$(gh pr view $pr --json baseRefName -q .baseRefName)
if [ "$pr_base" != "sycl" ]; then
continue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to do this for sycl-rel?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to do this for sycl-rel?

We have codeowners file reset on the sycl-rel branch so that I own everything and as such I'm aware of all the PRs.

I think that it is better to limit the number of gatekeepers involved in that, at least for now

fi

# Get the timestamp of the latest comment mentioning @intel/llvm-gatekeepers
latest_ts=$(gh pr view $pr --repo intel/llvm --json comments \
latest_ts=$(gh pr view $pr --json comments \
--jq '[.comments[] | select(.body | test("@intel/llvm-gatekeepers")) | .createdAt] | last')
# If there is no previous mention, ping the gatekeepers
if [[ -z "$latest_ts" ]]; then
Expand Down