From c360c73d0b932f969222f1a8f9a62df6e3acc670 Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sat, 17 May 2025 10:53:51 +0530 Subject: T7461: added actions for pr checks --- .github/workflows/add-pr-labels.yml | 16 ++++++++++++++++ .github/workflows/add-rebase-label.yml | 14 ++++++++++++++ .github/workflows/auto-author-assign.yml | 14 ++++++++++++++ .github/workflows/check-pr-conflicts.yml | 14 ++++++++++++++ .github/workflows/check-pr-message.yml | 17 +++++++++++++++++ .github/workflows/check-stale.yml | 13 +++++++++++++ .github/workflows/check-unused-imports.yml | 14 ++++++++++++++ .github/workflows/codeql.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/label-backport.yml | 12 ++++++++++++ .github/workflows/lint-with-ruff.yml | 14 ++++++++++++++ .github/workflows/sonarcloud.yml | 28 ++++++++++++++++++++++++++++ 11 files changed, 186 insertions(+) create mode 100644 .github/workflows/add-pr-labels.yml create mode 100644 .github/workflows/add-rebase-label.yml create mode 100644 .github/workflows/auto-author-assign.yml create mode 100644 .github/workflows/check-pr-conflicts.yml create mode 100644 .github/workflows/check-pr-message.yml create mode 100644 .github/workflows/check-stale.yml create mode 100644 .github/workflows/check-unused-imports.yml create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/label-backport.yml create mode 100644 .github/workflows/lint-with-ruff.yml create mode 100644 .github/workflows/sonarcloud.yml diff --git a/.github/workflows/add-pr-labels.yml b/.github/workflows/add-pr-labels.yml new file mode 100644 index 0000000..f90c5b0 --- /dev/null +++ b/.github/workflows/add-pr-labels.yml @@ -0,0 +1,16 @@ +--- +name: Add pull request labels + +on: + pull_request_target: + branches: + - current + +permissions: + pull-requests: write + contents: read + +jobs: + add-pr-label: + uses: accel-ppp/.github/.github/workflows/add-pr-labels.yml@T7461-add-reusable-actions + secrets: inherit diff --git a/.github/workflows/add-rebase-label.yml b/.github/workflows/add-rebase-label.yml new file mode 100644 index 0000000..75cbce3 --- /dev/null +++ b/.github/workflows/add-rebase-label.yml @@ -0,0 +1,14 @@ +name: Add rebase label + +on: + pull_request_target: + types: [synchronize, opened, reopened, labeled, unlabeled] + +permissions: + pull-requests: write + contents: read + +jobs: + add-rebase-label: + uses: accel-ppp/.github/.github/workflows/add-rebase-label.yml@T7461-add-reusable-actions + secrets: inherit diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml new file mode 100644 index 0000000..9da4968 --- /dev/null +++ b/.github/workflows/auto-author-assign.yml @@ -0,0 +1,14 @@ +name: "PR Triage" +on: + pull_request_target: + types: [opened, reopened, ready_for_review, locked] + + +permissions: + pull-requests: write + contents: read + +jobs: + assign-author: + uses: accel-ppp/.github/.github/workflows/assign-author.yml@T7461-add-reusable-actions + secrets: inherit diff --git a/.github/workflows/check-pr-conflicts.yml b/.github/workflows/check-pr-conflicts.yml new file mode 100644 index 0000000..4f59514 --- /dev/null +++ b/.github/workflows/check-pr-conflicts.yml @@ -0,0 +1,14 @@ + +name: "PR Conflicts checker" +on: + pull_request_target: + types: [synchronize] + +permissions: + pull-requests: write + contents: read + +jobs: + check-pr-conflict-call: + uses: accel-ppp/.github/.github/workflows/check-pr-merge-conflict.yml@T7461-add-reusable-actions + secrets: inherit diff --git a/.github/workflows/check-pr-message.yml b/.github/workflows/check-pr-message.yml new file mode 100644 index 0000000..00a3dae --- /dev/null +++ b/.github/workflows/check-pr-message.yml @@ -0,0 +1,17 @@ +--- +name: Check pull request message format + +on: + pull_request_target: + branches: + - current + types: [opened, synchronize, edited] + +permissions: + pull-requests: write + contents: read + +jobs: + check-pr-title: + uses: accel-ppp/.github/.github/workflows/check-pr-message.yml@T7461-add-reusable-actions + secrets: inherit diff --git a/.github/workflows/check-stale.yml b/.github/workflows/check-stale.yml new file mode 100644 index 0000000..d4bd60b --- /dev/null +++ b/.github/workflows/check-stale.yml @@ -0,0 +1,13 @@ +name: "Issue and PR stale management" +on: + schedule: + - cron: "0 0 * * *" + +permissions: + pull-requests: write + contents: read + +jobs: + stale: + uses: accel-ppp/.github/.github/workflows/check-stale.yml@T7461-add-reusable-actions + secrets: inherit diff --git a/.github/workflows/check-unused-imports.yml b/.github/workflows/check-unused-imports.yml new file mode 100644 index 0000000..922b2b7 --- /dev/null +++ b/.github/workflows/check-unused-imports.yml @@ -0,0 +1,14 @@ +name: Check for unused imports using Pylint +on: + pull_request_target: + branches: + - current + +permissions: + pull-requests: write + contents: read + +jobs: + check-unused-imports: + uses: accel-ppp/.github/.github/workflows/check-unused-imports.yml@T7461-add-reusable-actions + secrets: inherit diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..a3ff8a8 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,30 @@ +name: "Perform CodeQL Analysis" + +on: + push: + branches: [ "current" ] + paths: + - '**' + - '!.github/**' + - '!**/*.md' + pull_request: + # The branches below must be a subset of the branches above + branches: [ "current" ] + paths: + - '**' + - '!.github/**' + - '!**/*.md' + schedule: + - cron: '22 10 * * 0' + +permissions: + actions: read + contents: read + security-events: write + +jobs: + codeql-analysis-call: + uses: accel-ppp/.github/.github/workflows/codeql-analysis.yml@T7461-add-reusable-actions + secrets: inherit + with: + languages: "['python']" diff --git a/.github/workflows/label-backport.yml b/.github/workflows/label-backport.yml new file mode 100644 index 0000000..f939bc5 --- /dev/null +++ b/.github/workflows/label-backport.yml @@ -0,0 +1,12 @@ +name: Mergifyio backport + +on: [issue_comment] + +permissions: + pull-requests: write + contents: read + +jobs: + mergifyio-backport: + uses: accel-ppp/.github/.github/workflows/label-backport.yml@T7461-add-reusable-actions + secrets: inherit diff --git a/.github/workflows/lint-with-ruff.yml b/.github/workflows/lint-with-ruff.yml new file mode 100644 index 0000000..cc9706d --- /dev/null +++ b/.github/workflows/lint-with-ruff.yml @@ -0,0 +1,14 @@ +name: Lint py code with ruff +on: + pull_request_target: + branches: + - current + +permissions: + pull-requests: write + contents: read + +jobs: + ruff-lint: + uses: accel-ppp/.github/.github/workflows/lint-with-ruff.yml@T7461-add-reusable-actions + secrets: inherit diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 0000000..a8eaca7 --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,28 @@ +name: Sonar Checks +on: + push: + branches: + - current + paths: + - '**' + - '!.github/**' + - '!**/*.md' + pull_request_target: + types: [opened, synchronize, reopened] + paths: + - '**' + - '!.github/**' + - '!**/*.md' +jobs: + sonar-cloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} -- cgit v1.2.3 From abc0b6cc7c7628cfdd57101c24b34238662d110c Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sat, 17 May 2025 10:56:59 +0530 Subject: T7461: added actions for pr checks --- .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 922b2b7..0664d7d 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: #pull_request_target: branches: - current -- cgit v1.2.3 From ef5af0867875869c317b6865600c509e5579baca Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sat, 17 May 2025 10:58:25 +0530 Subject: T7461: added actions for pr checks --- .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 0664d7d..922b2b7 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: #pull_request_target: + pull_request_target: branches: - current -- cgit v1.2.3 From c6a1368d70ca60bb3a5a0b2649c9b3173fc3a621 Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sat, 17 May 2025 11:12:20 +0530 Subject: T7461: added actions for pr checks --- .github/workflows/add-pr-labels.yml | 2 +- .github/workflows/add-rebase-label.yml | 2 +- .github/workflows/auto-author-assign.yml | 2 +- .github/workflows/check-pr-conflicts.yml | 2 +- .github/workflows/check-pr-message.yml | 2 +- .github/workflows/check-stale.yml | 2 +- .github/workflows/check-unused-imports.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/label-backport.yml | 2 +- .github/workflows/lint-with-ruff.yml | 2 +- CODEOWNERS | 1 + 11 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 CODEOWNERS diff --git a/.github/workflows/add-pr-labels.yml b/.github/workflows/add-pr-labels.yml index f90c5b0..4a706ad 100644 --- a/.github/workflows/add-pr-labels.yml +++ b/.github/workflows/add-pr-labels.yml @@ -12,5 +12,5 @@ permissions: jobs: add-pr-label: - uses: accel-ppp/.github/.github/workflows/add-pr-labels.yml@T7461-add-reusable-actions + uses: accel-ppp/.github/.github/workflows/add-pr-labels.yml@current secrets: inherit diff --git a/.github/workflows/add-rebase-label.yml b/.github/workflows/add-rebase-label.yml index 75cbce3..d5769b7 100644 --- a/.github/workflows/add-rebase-label.yml +++ b/.github/workflows/add-rebase-label.yml @@ -10,5 +10,5 @@ permissions: jobs: add-rebase-label: - uses: accel-ppp/.github/.github/workflows/add-rebase-label.yml@T7461-add-reusable-actions + uses: accel-ppp/.github/.github/workflows/add-rebase-label.yml@current secrets: inherit diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml index 9da4968..28fe32f 100644 --- a/.github/workflows/auto-author-assign.yml +++ b/.github/workflows/auto-author-assign.yml @@ -10,5 +10,5 @@ permissions: jobs: assign-author: - uses: accel-ppp/.github/.github/workflows/assign-author.yml@T7461-add-reusable-actions + uses: accel-ppp/.github/.github/workflows/assign-author.yml@current secrets: inherit diff --git a/.github/workflows/check-pr-conflicts.yml b/.github/workflows/check-pr-conflicts.yml index 4f59514..1dad0b3 100644 --- a/.github/workflows/check-pr-conflicts.yml +++ b/.github/workflows/check-pr-conflicts.yml @@ -10,5 +10,5 @@ permissions: jobs: check-pr-conflict-call: - uses: accel-ppp/.github/.github/workflows/check-pr-merge-conflict.yml@T7461-add-reusable-actions + uses: accel-ppp/.github/.github/workflows/check-pr-merge-conflict.yml@current secrets: inherit diff --git a/.github/workflows/check-pr-message.yml b/.github/workflows/check-pr-message.yml index 00a3dae..5a44a59 100644 --- a/.github/workflows/check-pr-message.yml +++ b/.github/workflows/check-pr-message.yml @@ -13,5 +13,5 @@ permissions: jobs: check-pr-title: - uses: accel-ppp/.github/.github/workflows/check-pr-message.yml@T7461-add-reusable-actions + uses: accel-ppp/.github/.github/workflows/check-pr-message.yml@current secrets: inherit diff --git a/.github/workflows/check-stale.yml b/.github/workflows/check-stale.yml index d4bd60b..4df55ae 100644 --- a/.github/workflows/check-stale.yml +++ b/.github/workflows/check-stale.yml @@ -9,5 +9,5 @@ permissions: jobs: stale: - uses: accel-ppp/.github/.github/workflows/check-stale.yml@T7461-add-reusable-actions + uses: accel-ppp/.github/.github/workflows/check-stale.yml@current secrets: inherit diff --git a/.github/workflows/check-unused-imports.yml b/.github/workflows/check-unused-imports.yml index 922b2b7..5fd7d49 100644 --- a/.github/workflows/check-unused-imports.yml +++ b/.github/workflows/check-unused-imports.yml @@ -10,5 +10,5 @@ permissions: jobs: check-unused-imports: - uses: accel-ppp/.github/.github/workflows/check-unused-imports.yml@T7461-add-reusable-actions + uses: accel-ppp/.github/.github/workflows/check-unused-imports.yml@current secrets: inherit diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a3ff8a8..0895f42 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -24,7 +24,7 @@ permissions: jobs: codeql-analysis-call: - uses: accel-ppp/.github/.github/workflows/codeql-analysis.yml@T7461-add-reusable-actions + uses: accel-ppp/.github/.github/workflows/codeql-analysis.yml@current secrets: inherit with: languages: "['python']" diff --git a/.github/workflows/label-backport.yml b/.github/workflows/label-backport.yml index f939bc5..8b11879 100644 --- a/.github/workflows/label-backport.yml +++ b/.github/workflows/label-backport.yml @@ -8,5 +8,5 @@ permissions: jobs: mergifyio-backport: - uses: accel-ppp/.github/.github/workflows/label-backport.yml@T7461-add-reusable-actions + uses: accel-ppp/.github/.github/workflows/label-backport.yml@current secrets: inherit diff --git a/.github/workflows/lint-with-ruff.yml b/.github/workflows/lint-with-ruff.yml index cc9706d..44069c6 100644 --- a/.github/workflows/lint-with-ruff.yml +++ b/.github/workflows/lint-with-ruff.yml @@ -10,5 +10,5 @@ permissions: jobs: ruff-lint: - uses: accel-ppp/.github/.github/workflows/lint-with-ruff.yml@T7461-add-reusable-actions + uses: accel-ppp/.github/.github/workflows/lint-with-ruff.yml@current secrets: inherit diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..a66c07f --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +# * @accel-ppp/legacy-accel-ppp-reviewers \ No newline at end of file -- cgit v1.2.3 From 8a69103b24ea9195f194f2cab40bbaa49a19f027 Mon Sep 17 00:00:00 2001 From: kumvijaya Date: Sat, 17 May 2025 11:16:19 +0530 Subject: T7461: added actions for pr checks --- .github/PULL_REQUEST_TEMPLATE.md | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..caabab3 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,53 @@ + + + +## Change summary + + +## Types of changes + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Code style update (formatting, renaming) +- [ ] Refactoring (no functional changes) +- [ ] Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component +- [ ] Other (please describe): + +## Related Task(s) + + + +## Related PR(s) + + +## How to test / Smoketest result + + +## Checklist: + + + +- [ ] I have read the [**CONTRIBUTING**](https://github.com/vyos/vyos-1x/blob/current/CONTRIBUTING.md) document +- [ ] I have linked this PR to one or more Phabricator Task(s) +- [ ] I have run the components [**SMOKETESTS**](https://github.com/vyos/vyos-1x/tree/current/smoketest/scripts/cli) if applicable +- [ ] My commit headlines contain a valid Task id +- [ ] My change requires a change to the documentation +- [ ] I have updated the documentation accordingly -- cgit v1.2.3