From 09d309f82663b7c1e825043817f48dce289242ea Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 21 Nov 2024 11:33:01 +0800 Subject: [PATCH 01/14] add excludes, skip for special pr Signed-off-by: YanxuanLiu --- .github/workflows/license-header-check.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/license-header-check.yml b/.github/workflows/license-header-check.yml index a2faa44f8..85eb6a6a2 100644 --- a/.github/workflows/license-header-check.yml +++ b/.github/workflows/license-header-check.yml @@ -22,6 +22,7 @@ on: jobs: license-header-check: runs-on: ubuntu-latest + if: "!startsWith(${{github.event.pull_request.title}}, '[submodule-sync]')" steps: - name: Checkout code uses: actions/checkout@v4 @@ -46,3 +47,6 @@ jobs: *.xml, *.fbs, build/* + excluded_file_patterns: | + thirdparty/* + From 1ac925409e203a77189000654a0d89a02c3104cb Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 21 Nov 2024 11:45:42 +0800 Subject: [PATCH 02/14] change depth Signed-off-by: YanxuanLiu --- .github/workflows/license-header-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/license-header-check.yml b/.github/workflows/license-header-check.yml index 85eb6a6a2..3a4f44fdf 100644 --- a/.github/workflows/license-header-check.yml +++ b/.github/workflows/license-header-check.yml @@ -27,7 +27,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - fetch-depth: 5 + fetch-depth: 0 - name: license-header-check uses: NVIDIA/spark-rapids-common/license-header-check@main From 8fe254ce885cac8e34b270a48d97f3554a88cb38 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 21 Nov 2024 11:59:12 +0800 Subject: [PATCH 03/14] dynamic depth Signed-off-by: YanxuanLiu --- .github/workflows/license-header-check.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/license-header-check.yml b/.github/workflows/license-header-check.yml index 3a4f44fdf..6bbb0d269 100644 --- a/.github/workflows/license-header-check.yml +++ b/.github/workflows/license-header-check.yml @@ -24,10 +24,15 @@ jobs: runs-on: ubuntu-latest if: "!startsWith(${{github.event.pull_request.title}}, '[submodule-sync]')" steps: + - name: Get checkout depth + run: | + commits_count=$(echo ${{ github.event.pull_request.commits }} | jq '. | length') + echo "PR_FETCH_DEPTH=$(( commits_count + 1 ))" >> $GITHUB_ENV + - name: Checkout code uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: ${{ env.PR_FETCH_DEPTH }} - name: license-header-check uses: NVIDIA/spark-rapids-common/license-header-check@main From 56db8c35a5a18470baad7d0bd95719c9e22419b8 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 21 Nov 2024 12:05:57 +0800 Subject: [PATCH 04/14] depth Signed-off-by: YanxuanLiu --- .github/workflows/license-header-check.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/license-header-check.yml b/.github/workflows/license-header-check.yml index 6bbb0d269..7137ed561 100644 --- a/.github/workflows/license-header-check.yml +++ b/.github/workflows/license-header-check.yml @@ -26,8 +26,7 @@ jobs: steps: - name: Get checkout depth run: | - commits_count=$(echo ${{ github.event.pull_request.commits }} | jq '. | length') - echo "PR_FETCH_DEPTH=$(( commits_count + 1 ))" >> $GITHUB_ENV + echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV - name: Checkout code uses: actions/checkout@v4 From 01b099fa7ebca0eaa97f519fbce7aa9554e164a5 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 21 Nov 2024 12:07:04 +0800 Subject: [PATCH 05/14] test Signed-off-by: YanxuanLiu --- .github/workflows/action-helper/python/auto-merge | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/action-helper/python/auto-merge b/.github/workflows/action-helper/python/auto-merge index dcd03ecd1..ae6459214 100755 --- a/.github/workflows/action-helper/python/auto-merge +++ b/.github/workflows/action-helper/python/auto-merge @@ -36,6 +36,7 @@ def main(): help="if delete HEAD branch after auto-merge") args = parser.parse_args() + pr = PullRequest(head_owner=args.owner, head=args.head, head_token=args.token, base_owner=args.owner, repo=args.repo, base=args.base, base_token=args.token) try: From b4dd1fd876445b711ee471c9fe1728026ebd8a73 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 21 Nov 2024 12:07:16 +0800 Subject: [PATCH 06/14] test Signed-off-by: YanxuanLiu --- .github/workflows/action-helper/python/auto-merge | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/action-helper/python/auto-merge b/.github/workflows/action-helper/python/auto-merge index ae6459214..dcd03ecd1 100755 --- a/.github/workflows/action-helper/python/auto-merge +++ b/.github/workflows/action-helper/python/auto-merge @@ -36,7 +36,6 @@ def main(): help="if delete HEAD branch after auto-merge") args = parser.parse_args() - pr = PullRequest(head_owner=args.owner, head=args.head, head_token=args.token, base_owner=args.owner, repo=args.repo, base=args.base, base_token=args.token) try: From 66f57068d004dad97af33702f0b4c4045af279ad Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 21 Nov 2024 12:07:35 +0800 Subject: [PATCH 07/14] test Signed-off-by: YanxuanLiu --- .github/workflows/action-helper/python/auto-merge | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/action-helper/python/auto-merge b/.github/workflows/action-helper/python/auto-merge index dcd03ecd1..ae6459214 100755 --- a/.github/workflows/action-helper/python/auto-merge +++ b/.github/workflows/action-helper/python/auto-merge @@ -36,6 +36,7 @@ def main(): help="if delete HEAD branch after auto-merge") args = parser.parse_args() + pr = PullRequest(head_owner=args.owner, head=args.head, head_token=args.token, base_owner=args.owner, repo=args.repo, base=args.base, base_token=args.token) try: From 9fd050adda2384c77b1f105d7a45366f70888b4e Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 21 Nov 2024 12:18:36 +0800 Subject: [PATCH 08/14] +10 depth Signed-off-by: YanxuanLiu --- .github/workflows/license-header-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/license-header-check.yml b/.github/workflows/license-header-check.yml index 7137ed561..4997b9b65 100644 --- a/.github/workflows/license-header-check.yml +++ b/.github/workflows/license-header-check.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Get checkout depth run: | - echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV + echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 10 ))" >> $GITHUB_ENV - name: Checkout code uses: actions/checkout@v4 From a818d6e10bc26290042b62796ad3484a622c12f1 Mon Sep 17 00:00:00 2001 From: YanxuanLiu <104543031+YanxuanLiu@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:23:17 +0800 Subject: [PATCH 09/14] remove useless changes --- .github/workflows/action-helper/python/auto-merge | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/action-helper/python/auto-merge b/.github/workflows/action-helper/python/auto-merge index ae6459214..dcd03ecd1 100755 --- a/.github/workflows/action-helper/python/auto-merge +++ b/.github/workflows/action-helper/python/auto-merge @@ -36,7 +36,6 @@ def main(): help="if delete HEAD branch after auto-merge") args = parser.parse_args() - pr = PullRequest(head_owner=args.owner, head=args.head, head_token=args.token, base_owner=args.owner, repo=args.repo, base=args.base, base_token=args.token) try: From 3a70db9d55f55508efdeb999259993ea4fea6a2d Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 21 Nov 2024 12:26:17 +0800 Subject: [PATCH 10/14] remove space line Signed-off-by: YanxuanLiu --- .github/workflows/license-header-check.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/license-header-check.yml b/.github/workflows/license-header-check.yml index 4997b9b65..953ac3f57 100644 --- a/.github/workflows/license-header-check.yml +++ b/.github/workflows/license-header-check.yml @@ -53,4 +53,3 @@ jobs: build/* excluded_file_patterns: | thirdparty/* - From 5138a78edc2c6d52224e58f8f5ae0d66aa2c98a9 Mon Sep 17 00:00:00 2001 From: YanxuanLiu <104543031+YanxuanLiu@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:26:44 +0800 Subject: [PATCH 11/14] Update license-header-check.yml --- .github/workflows/license-header-check.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/license-header-check.yml b/.github/workflows/license-header-check.yml index 4997b9b65..953ac3f57 100644 --- a/.github/workflows/license-header-check.yml +++ b/.github/workflows/license-header-check.yml @@ -53,4 +53,3 @@ jobs: build/* excluded_file_patterns: | thirdparty/* - From 67f330602b8e4a932e819dc65b94f48c871dbd6f Mon Sep 17 00:00:00 2001 From: YanxuanLiu <104543031+YanxuanLiu@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:31:39 +0800 Subject: [PATCH 12/14] Update license-header-check.yml format --- .github/workflows/license-header-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/license-header-check.yml b/.github/workflows/license-header-check.yml index 953ac3f57..a762b625b 100644 --- a/.github/workflows/license-header-check.yml +++ b/.github/workflows/license-header-check.yml @@ -22,7 +22,7 @@ on: jobs: license-header-check: runs-on: ubuntu-latest - if: "!startsWith(${{github.event.pull_request.title}}, '[submodule-sync]')" + if: "!startsWith(${{ github.event.pull_request.title }}, '[submodule-sync]')" steps: - name: Get checkout depth run: | From 5203ddf2365cf76b2d64f364d4ab0708c4ac9913 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 21 Nov 2024 12:35:20 +0800 Subject: [PATCH 13/14] check title contains bot Signed-off-by: YanxuanLiu --- .github/workflows/license-header-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/license-header-check.yml b/.github/workflows/license-header-check.yml index a762b625b..f7149d60b 100644 --- a/.github/workflows/license-header-check.yml +++ b/.github/workflows/license-header-check.yml @@ -22,7 +22,7 @@ on: jobs: license-header-check: runs-on: ubuntu-latest - if: "!startsWith(${{ github.event.pull_request.title }}, '[submodule-sync]')" + if: "!contains(${{ github.event.pull_request.title }}, '[bot]')" steps: - name: Get checkout depth run: | From 3aaf5534ae8b5b3d9a978106a399a8208ffa9763 Mon Sep 17 00:00:00 2001 From: YanxuanLiu Date: Thu, 21 Nov 2024 12:50:12 +0800 Subject: [PATCH 14/14] contains issueg Signed-off-by: YanxuanLiu --- .github/workflows/license-header-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/license-header-check.yml b/.github/workflows/license-header-check.yml index f7149d60b..db783e66a 100644 --- a/.github/workflows/license-header-check.yml +++ b/.github/workflows/license-header-check.yml @@ -22,7 +22,7 @@ on: jobs: license-header-check: runs-on: ubuntu-latest - if: "!contains(${{ github.event.pull_request.title }}, '[bot]')" + if: "!contains(github.event.pull_request.title, '[bot]')" steps: - name: Get checkout depth run: |