summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMoshe Atlow <moshe@atlow.co.il>2022-11-12 18:22:02 +0200
committerGitHub <noreply@github.com>2022-11-12 16:22:02 +0000
commit119559a361d8859aa78ace580726a24c24594e83 (patch)
tree136544b77433d3ef48ae5ba651b16103e9d7c568 /.github
parent9baf748ee8ab43abdeac5a3182f3dcf094895f75 (diff)
downloadnode-new-119559a361d8859aa78ace580726a24c24594e83.tar.gz
tools: do not run CQ on non-fast-tracked PRs open for less than 2 days
PR-URL: https://github.com/nodejs/node/pull/45407 Fixes: https://github.com/nodejs/node/issues/45405 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/commit-queue.yml14
1 files changed, 12 insertions, 2 deletions
diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml
index 18a26666de..59ab3d2ce6 100644
--- a/.github/workflows/commit-queue.yml
+++ b/.github/workflows/commit-queue.yml
@@ -32,14 +32,24 @@ jobs:
steps:
- name: Get Pull Requests
id: get_mergeable_prs
- run: >
- numbers=$(gh pr list \
+ run: |
+ prs=$(gh pr list \
+ --repo ${{ github.repository }} \
+ --base ${{ github.ref_name }} \
+ --label 'commit-queue' \
+ --json 'number' \
+ --search "created:<=$(date --date="2 days ago" +"%Y-%m-%dT%H:%M:%S%z")" \
+ -t '{{ range . }}{{ .number }} {{ end }}' \
+ --limit 100)
+ fast_track_prs=$(gh pr list \
--repo ${{ github.repository }} \
--base ${{ github.ref_name }} \
--label 'commit-queue' \
+ --label 'fast-track' \
--json 'number' \
-t '{{ range . }}{{ .number }} {{ end }}' \
--limit 100)
+ numbers=$(echo $prs' '$fast_track_prs | jq -r -s 'unique | join(" ")')
echo "numbers=$numbers" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}