From fd3fb3f410f4c8bbbc1ac70fd8d0f608ab0c0cef Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sat, 18 May 2024 22:32:48 +0530 Subject: [PATCH 01/11] T6349: updated pr-labels workflow permission and updated reusable workflow version for all --- .github/workflows/add-pr-labels.yml | 7 +++++++ .github/workflows/auto-author-assign.yml | 4 ++++ .github/workflows/chceck-pr-message.yml | 4 ++++ .github/workflows/check-pr-conflicts.yml | 4 ++++ .github/workflows/check-stale.yml | 4 ++++ .github/workflows/check-unused-imports.yml | 4 ++++ .github/workflows/codeql.yml | 4 ++++ .github/workflows/label-backport.yml | 4 ++++ .github/workflows/linit-j2.yml | 4 ++++ 9 files changed, 39 insertions(+) diff --git a/.github/workflows/add-pr-labels.yml b/.github/workflows/add-pr-labels.yml index 78d619f4a1..b4dc7a6ae7 100644 --- a/.github/workflows/add-pr-labels.yml +++ b/.github/workflows/add-pr-labels.yml @@ -9,7 +9,14 @@ on: - equuleus - sagitta +permissions: + pull-requests: write + jobs: add-pr-label: +<<<<<<< HEAD + uses: vyos/.github/.github/workflows/add-pr-labels.yml@main +======= uses: vyos/.github/.github/workflows/add-pr-labels.yml@feature/T6349-reusable-workflows +>>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml index 1f69f48073..92976672d1 100644 --- a/.github/workflows/auto-author-assign.yml +++ b/.github/workflows/auto-author-assign.yml @@ -8,5 +8,9 @@ permissions: jobs: assign-author: +<<<<<<< HEAD + uses: vyos/.github/.github/workflows/assign-author.yml@main +======= uses: vyos/.github/.github/workflows/assign-author.yml@feature/T6349-reusable-workflows +>>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/chceck-pr-message.yml b/.github/workflows/chceck-pr-message.yml index 95c5b69ce9..85d289e21f 100644 --- a/.github/workflows/chceck-pr-message.yml +++ b/.github/workflows/chceck-pr-message.yml @@ -10,5 +10,9 @@ on: jobs: check-pr-title: +<<<<<<< HEAD + uses: vyos/.github/.github/workflows/check-pr-message.yml@main +======= uses: vyos/.github/.github/workflows/check-pr-message.yml@feature/T6349-reusable-workflows +>>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/check-pr-conflicts.yml b/.github/workflows/check-pr-conflicts.yml index 62a37a7faa..b091843484 100644 --- a/.github/workflows/check-pr-conflicts.yml +++ b/.github/workflows/check-pr-conflicts.yml @@ -9,5 +9,9 @@ permissions: jobs: check-pr-conflict-call: +<<<<<<< HEAD + uses: vyos/.github/.github/workflows/check-pr-merge-conflict.yml@main +======= uses: vyos/.github/.github/workflows/check-pr-merge-conflict.yml@feature/T6349-reusable-workflows +>>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/check-stale.yml b/.github/workflows/check-stale.yml index 0b88acdb7e..f8db4598ea 100644 --- a/.github/workflows/check-stale.yml +++ b/.github/workflows/check-stale.yml @@ -5,5 +5,9 @@ on: jobs: stale: +<<<<<<< HEAD + uses: vyos/.github/.github/workflows/check-stale.yml@main +======= uses: vyos/.github/.github/workflows/check-stale.yml@feature/T6349-reusable-workflows +>>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/check-unused-imports.yml b/.github/workflows/check-unused-imports.yml index 468543d6e5..df7f6b70f6 100644 --- a/.github/workflows/check-unused-imports.yml +++ b/.github/workflows/check-unused-imports.yml @@ -7,5 +7,9 @@ on: jobs: Check-Unused-Imports: +<<<<<<< HEAD + uses: vyos/.github/.github/workflows/check-unused-imports.yml@main +======= uses: vyos/.github/.github/workflows/check-unused-imports.yml@feature/T6349-reusable-workflows +>>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f6472784d6..441f93f0ff 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -16,7 +16,11 @@ permissions: jobs: codeql-analysis-call: +<<<<<<< HEAD + uses: vyos/.github/.github/workflows/codeql-analysis.yml@main +======= uses: vyos/.github/.github/workflows/codeql-analysis.yml@feature/T6349-reusable-workflows +>>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit with: languages: "['python']" diff --git a/.github/workflows/label-backport.yml b/.github/workflows/label-backport.yml index 581363eb13..6c5f716097 100644 --- a/.github/workflows/label-backport.yml +++ b/.github/workflows/label-backport.yml @@ -4,5 +4,9 @@ on: [issue_comment] jobs: mergifyio_backport: +<<<<<<< HEAD + uses: vyos/.github/.github/workflows/label-backport.yml@main +======= uses: vyos/.github/.github/workflows/label-backport.yml@feature/T6349-reusable-workflows +>>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/linit-j2.yml b/.github/workflows/linit-j2.yml index 093fe7ffed..4f42153c32 100644 --- a/.github/workflows/linit-j2.yml +++ b/.github/workflows/linit-j2.yml @@ -10,5 +10,9 @@ on: jobs: j2lint: +<<<<<<< HEAD + uses: vyos/.github/.github/workflows/lint-j2.yml@main +======= uses: vyos/.github/.github/workflows/lint-j2.yml@feature/T6349-reusable-workflows +>>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit From 875b1bf06f712a3830d8b829378dedcd1f8cfef5 Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sat, 18 May 2024 22:52:37 +0530 Subject: [PATCH 02/11] T6349: updated pr-labels workflow permission --- .github/workflows/add-pr-labels.yml | 4 ---- .github/workflows/auto-author-assign.yml | 4 ---- .github/workflows/chceck-pr-message.yml | 4 ---- .github/workflows/check-pr-conflicts.yml | 4 ---- .github/workflows/check-stale.yml | 7 +++---- .github/workflows/check-unused-imports.yml | 6 +----- .github/workflows/codeql.yml | 4 ---- .github/workflows/label-backport.yml | 9 ++++----- .github/workflows/linit-j2.yml | 4 ---- 9 files changed, 8 insertions(+), 38 deletions(-) diff --git a/.github/workflows/add-pr-labels.yml b/.github/workflows/add-pr-labels.yml index b4dc7a6ae7..068b658791 100644 --- a/.github/workflows/add-pr-labels.yml +++ b/.github/workflows/add-pr-labels.yml @@ -14,9 +14,5 @@ permissions: jobs: add-pr-label: -<<<<<<< HEAD - uses: vyos/.github/.github/workflows/add-pr-labels.yml@main -======= uses: vyos/.github/.github/workflows/add-pr-labels.yml@feature/T6349-reusable-workflows ->>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml index 92976672d1..1f69f48073 100644 --- a/.github/workflows/auto-author-assign.yml +++ b/.github/workflows/auto-author-assign.yml @@ -8,9 +8,5 @@ permissions: jobs: assign-author: -<<<<<<< HEAD - uses: vyos/.github/.github/workflows/assign-author.yml@main -======= uses: vyos/.github/.github/workflows/assign-author.yml@feature/T6349-reusable-workflows ->>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/chceck-pr-message.yml b/.github/workflows/chceck-pr-message.yml index 85d289e21f..95c5b69ce9 100644 --- a/.github/workflows/chceck-pr-message.yml +++ b/.github/workflows/chceck-pr-message.yml @@ -10,9 +10,5 @@ on: jobs: check-pr-title: -<<<<<<< HEAD - uses: vyos/.github/.github/workflows/check-pr-message.yml@main -======= uses: vyos/.github/.github/workflows/check-pr-message.yml@feature/T6349-reusable-workflows ->>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/check-pr-conflicts.yml b/.github/workflows/check-pr-conflicts.yml index b091843484..62a37a7faa 100644 --- a/.github/workflows/check-pr-conflicts.yml +++ b/.github/workflows/check-pr-conflicts.yml @@ -9,9 +9,5 @@ permissions: jobs: check-pr-conflict-call: -<<<<<<< HEAD - uses: vyos/.github/.github/workflows/check-pr-merge-conflict.yml@main -======= uses: vyos/.github/.github/workflows/check-pr-merge-conflict.yml@feature/T6349-reusable-workflows ->>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/check-stale.yml b/.github/workflows/check-stale.yml index f8db4598ea..60a3cf88fb 100644 --- a/.github/workflows/check-stale.yml +++ b/.github/workflows/check-stale.yml @@ -3,11 +3,10 @@ on: schedule: - cron: "0 0 * * *" +permissions: + pull-requests: write + jobs: stale: -<<<<<<< HEAD - uses: vyos/.github/.github/workflows/check-stale.yml@main -======= uses: vyos/.github/.github/workflows/check-stale.yml@feature/T6349-reusable-workflows ->>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/check-unused-imports.yml b/.github/workflows/check-unused-imports.yml index df7f6b70f6..42e8be49b2 100644 --- a/.github/workflows/check-unused-imports.yml +++ b/.github/workflows/check-unused-imports.yml @@ -6,10 +6,6 @@ on: - sagitta jobs: - Check-Unused-Imports: -<<<<<<< HEAD - uses: vyos/.github/.github/workflows/check-unused-imports.yml@main -======= + check-unused-imports: uses: vyos/.github/.github/workflows/check-unused-imports.yml@feature/T6349-reusable-workflows ->>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 441f93f0ff..f6472784d6 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -16,11 +16,7 @@ permissions: jobs: codeql-analysis-call: -<<<<<<< HEAD - uses: vyos/.github/.github/workflows/codeql-analysis.yml@main -======= uses: vyos/.github/.github/workflows/codeql-analysis.yml@feature/T6349-reusable-workflows ->>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit with: languages: "['python']" diff --git a/.github/workflows/label-backport.yml b/.github/workflows/label-backport.yml index 6c5f716097..d92acbec57 100644 --- a/.github/workflows/label-backport.yml +++ b/.github/workflows/label-backport.yml @@ -2,11 +2,10 @@ name: Mergifyio backport on: [issue_comment] +permissions: + pull-requests: write + jobs: - mergifyio_backport: -<<<<<<< HEAD - uses: vyos/.github/.github/workflows/label-backport.yml@main -======= + mergifyio-backport: uses: vyos/.github/.github/workflows/label-backport.yml@feature/T6349-reusable-workflows ->>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit diff --git a/.github/workflows/linit-j2.yml b/.github/workflows/linit-j2.yml index 4f42153c32..093fe7ffed 100644 --- a/.github/workflows/linit-j2.yml +++ b/.github/workflows/linit-j2.yml @@ -10,9 +10,5 @@ on: jobs: j2lint: -<<<<<<< HEAD - uses: vyos/.github/.github/workflows/lint-j2.yml@main -======= uses: vyos/.github/.github/workflows/lint-j2.yml@feature/T6349-reusable-workflows ->>>>>>> 9a5897682a6d7fb59e2e90eb50b87dbbe8babaea secrets: inherit From dabf2c4f0882b9de4fa1dfdf001f71942736fc71 Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sat, 18 May 2024 23:45:14 +0530 Subject: [PATCH 03/11] T6349: updated pr-labels workflow permission, and removed unused import --- src/op_mode/cgnat.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/op_mode/cgnat.py b/src/op_mode/cgnat.py index a98269a15f..e58b15809b 100755 --- a/src/op_mode/cgnat.py +++ b/src/op_mode/cgnat.py @@ -16,7 +16,6 @@ import json import sys -import typing from tabulate import tabulate From 1469ac6b47123148c00b648d109d72805e378f68 Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sat, 18 May 2024 23:53:22 +0530 Subject: [PATCH 04/11] T6349: updated pr-labels workflow permission, and removed unused import --- .github/workflows/check-unused-imports.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-unused-imports.yml b/.github/workflows/check-unused-imports.yml index 42e8be49b2..7615863ac6 100644 --- a/.github/workflows/check-unused-imports.yml +++ b/.github/workflows/check-unused-imports.yml @@ -4,6 +4,7 @@ on: branches: - current - sagitta + workflow_dispatch: jobs: check-unused-imports: From 472d28921ce70737872c0828ce977c507719047a Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sat, 18 May 2024 23:57:34 +0530 Subject: [PATCH 05/11] T6349: updated pr-labels workflow permission, and removed unused import --- .github/workflows/check-unused-imports.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check-unused-imports.yml b/.github/workflows/check-unused-imports.yml index 7615863ac6..42e8be49b2 100644 --- a/.github/workflows/check-unused-imports.yml +++ b/.github/workflows/check-unused-imports.yml @@ -4,7 +4,6 @@ on: branches: - current - sagitta - workflow_dispatch: jobs: check-unused-imports: From c586b5b267932db8c82213bb8cf92975ffb8c489 Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sun, 19 May 2024 00:01:16 +0530 Subject: [PATCH 06/11] T6349: updated pr-labels workflow permission, and removed unused import --- .github/workflows/check-unused-imports.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-unused-imports.yml b/.github/workflows/check-unused-imports.yml index 42e8be49b2..7615863ac6 100644 --- a/.github/workflows/check-unused-imports.yml +++ b/.github/workflows/check-unused-imports.yml @@ -4,6 +4,7 @@ on: branches: - current - sagitta + workflow_dispatch: jobs: check-unused-imports: From 9b29a34e109cb761ef65e238203e4e4174e583d3 Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sun, 19 May 2024 00:08:10 +0530 Subject: [PATCH 07/11] T6349: updated pr-labels workflow permission, and removed unused import --- .github/workflows/add-pr-labels.yml | 1 + .github/workflows/auto-author-assign.yml | 2 ++ .github/workflows/chceck-pr-message.yml | 4 ++++ .github/workflows/check-pr-conflicts.yml | 1 + .github/workflows/check-stale.yml | 1 + .github/workflows/check-unused-imports.yml | 4 ++++ .github/workflows/label-backport.yml | 3 ++- .github/workflows/linit-j2.yml | 4 ++++ 8 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/add-pr-labels.yml b/.github/workflows/add-pr-labels.yml index 068b658791..1723cceb01 100644 --- a/.github/workflows/add-pr-labels.yml +++ b/.github/workflows/add-pr-labels.yml @@ -11,6 +11,7 @@ on: permissions: pull-requests: write + contents: read jobs: add-pr-label: diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml index 1f69f48073..c3696ea476 100644 --- a/.github/workflows/auto-author-assign.yml +++ b/.github/workflows/auto-author-assign.yml @@ -3,8 +3,10 @@ on: pull_request_target: types: [opened, reopened, ready_for_review, locked] + permissions: pull-requests: write + contents: read jobs: assign-author: diff --git a/.github/workflows/chceck-pr-message.yml b/.github/workflows/chceck-pr-message.yml index 95c5b69ce9..e7e4569617 100644 --- a/.github/workflows/chceck-pr-message.yml +++ b/.github/workflows/chceck-pr-message.yml @@ -8,6 +8,10 @@ on: - crux - equuleus +permissions: + pull-requests: write + contents: read + jobs: check-pr-title: uses: vyos/.github/.github/workflows/check-pr-message.yml@feature/T6349-reusable-workflows diff --git a/.github/workflows/check-pr-conflicts.yml b/.github/workflows/check-pr-conflicts.yml index 62a37a7faa..0c659e6ed9 100644 --- a/.github/workflows/check-pr-conflicts.yml +++ b/.github/workflows/check-pr-conflicts.yml @@ -6,6 +6,7 @@ on: permissions: pull-requests: write + contents: read jobs: check-pr-conflict-call: diff --git a/.github/workflows/check-stale.yml b/.github/workflows/check-stale.yml index 60a3cf88fb..b5ec533f18 100644 --- a/.github/workflows/check-stale.yml +++ b/.github/workflows/check-stale.yml @@ -5,6 +5,7 @@ on: permissions: pull-requests: write + contents: read jobs: stale: diff --git a/.github/workflows/check-unused-imports.yml b/.github/workflows/check-unused-imports.yml index 7615863ac6..0d64f8362e 100644 --- a/.github/workflows/check-unused-imports.yml +++ b/.github/workflows/check-unused-imports.yml @@ -6,6 +6,10 @@ on: - sagitta workflow_dispatch: +permissions: + pull-requests: write + contents: read + jobs: check-unused-imports: uses: vyos/.github/.github/workflows/check-unused-imports.yml@feature/T6349-reusable-workflows diff --git a/.github/workflows/label-backport.yml b/.github/workflows/label-backport.yml index d92acbec57..9192b81843 100644 --- a/.github/workflows/label-backport.yml +++ b/.github/workflows/label-backport.yml @@ -3,7 +3,8 @@ name: Mergifyio backport on: [issue_comment] permissions: - pull-requests: write + pull-requests: write + contents: read jobs: mergifyio-backport: diff --git a/.github/workflows/linit-j2.yml b/.github/workflows/linit-j2.yml index 093fe7ffed..364a65a14e 100644 --- a/.github/workflows/linit-j2.yml +++ b/.github/workflows/linit-j2.yml @@ -8,6 +8,10 @@ on: - crux - equuleus +permissions: + pull-requests: write + contents: read + jobs: j2lint: uses: vyos/.github/.github/workflows/lint-j2.yml@feature/T6349-reusable-workflows From c40376030d6762824572f655dd2ec3c9424bc1dd Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sun, 19 May 2024 00:12:59 +0530 Subject: [PATCH 08/11] T6349: updated pr-labels workflow permission, and removed unused import --- .github/workflows/check-unused-imports.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check-unused-imports.yml b/.github/workflows/check-unused-imports.yml index 0d64f8362e..3348cba76e 100644 --- a/.github/workflows/check-unused-imports.yml +++ b/.github/workflows/check-unused-imports.yml @@ -4,7 +4,6 @@ on: branches: - current - sagitta - workflow_dispatch: permissions: pull-requests: write From bc6503cf367a15d0ce3e30f4fdf636f99d9f1422 Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sun, 19 May 2024 00:16:16 +0530 Subject: [PATCH 09/11] T6349: updated pr-labels workflow permission, and removed unused import --- .github/workflows/check-unused-imports.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check-unused-imports.yml b/.github/workflows/check-unused-imports.yml index 3348cba76e..5cb023debe 100644 --- a/.github/workflows/check-unused-imports.yml +++ b/.github/workflows/check-unused-imports.yml @@ -6,7 +6,6 @@ on: - sagitta permissions: - pull-requests: write contents: read jobs: From bb466d51a57aae7313b5d27651b51f6848956aff Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sun, 19 May 2024 00:18:20 +0530 Subject: [PATCH 10/11] T6349: updated pr-labels workflow permission, and removed unused import --- .github/workflows/check-unused-imports.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-unused-imports.yml b/.github/workflows/check-unused-imports.yml index 5cb023debe..17bc1d9190 100644 --- a/.github/workflows/check-unused-imports.yml +++ b/.github/workflows/check-unused-imports.yml @@ -4,6 +4,7 @@ on: branches: - current - sagitta + workflow_dispatch: permissions: contents: read From 969d7a977b7b2feeee185272972a0462b7adf843 Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sun, 19 May 2024 00:23:43 +0530 Subject: [PATCH 11/11] T6349: updated pr-labels workflow permission, and removed unused import --- .github/workflows/check-unused-imports.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-unused-imports.yml b/.github/workflows/check-unused-imports.yml index 17bc1d9190..aada264f77 100644 --- a/.github/workflows/check-unused-imports.yml +++ b/.github/workflows/check-unused-imports.yml @@ -1,6 +1,6 @@ name: Check for unused imports using Pylint on: - pull_request_target: + pull_request: branches: - current - sagitta