From de28e615670aca9b835fc937d874535275c381e0 Mon Sep 17 00:00:00 2001 From: Alexey Karasev Date: Mon, 3 Mar 2025 21:16:27 +0500 Subject: [PATCH] feat: add linters add DependaBot configurations --- .github/automatic-pr-labeler.yaml | 17 +++++++++ .github/dependabot.yaml | 17 +++++++++ .github/release-drafter-config.yml | 43 ++++++++++++++++++++++ .github/workflows/auto-labeler-config.yaml | 24 ++++++++++++ .github/workflows/cla.yaml | 13 +++++++ .github/workflows/profanity-filter.yaml | 18 +++++++++ .github/workflows/super-linter.yaml | 14 +++++++ 7 files changed, 146 insertions(+) create mode 100644 .github/automatic-pr-labeler.yaml create mode 100644 .github/dependabot.yaml create mode 100644 .github/release-drafter-config.yml create mode 100644 .github/workflows/auto-labeler-config.yaml create mode 100644 .github/workflows/cla.yaml create mode 100644 .github/workflows/profanity-filter.yaml create mode 100644 .github/workflows/super-linter.yaml diff --git a/.github/automatic-pr-labeler.yaml b/.github/automatic-pr-labeler.yaml new file mode 100644 index 0000000..7eda285 --- /dev/null +++ b/.github/automatic-pr-labeler.yaml @@ -0,0 +1,17 @@ +--- +name: Automatic PR Labeler + +on: + pull_request: + branches: [main] + types: + [opened, reopened] + +jobs: + assign-labels: + uses: Netcracker/qubership-workflow-hub/.github/workflows/auto-labeler.yaml@main + name: Assign labels in pull request + if: github.event.pull_request.merged == false + with: + pull_request_number: ${{ github.event.pull_request.number }} + config_file: './.github/auto-labeler-config.yaml' diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..467fec2 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,17 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + # Maven bot configurations + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "monthly" + open-pull-requests-limit: 20 + # Docker bot configurations + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/release-drafter-config.yml b/.github/release-drafter-config.yml new file mode 100644 index 0000000..ab331ef --- /dev/null +++ b/.github/release-drafter-config.yml @@ -0,0 +1,43 @@ +name-template: 'v$RESOLVED_VERSION' +tag-template: 'v$RESOLVED_VERSION' + + +categories: + - title: '💥 Breaking Changes' + labels: + - breaking-change + - title: '🚀 New Features' + labels: + - feature + - enhancement + - title: '🐛 Bug Fixes' + labels: + - bug + - fix + - bugfix + - title: '🛠️ Technical Debt' + labels: + - refactor + +change-template: '- $TITLE (#$NUMBER) by @$AUTHOR' +no-changes-template: 'No significant changes' + +template: | + ## 🚀 Release + + ### What's Changed + $CHANGES + + **Contributors:** $CONTRIBUTORS + +version-resolver: + major: + labels: + - major + minor: + labels: + - minor + patch: + labels: + - patch + default: patch \ No newline at end of file diff --git a/.github/workflows/auto-labeler-config.yaml b/.github/workflows/auto-labeler-config.yaml new file mode 100644 index 0000000..36ff639 --- /dev/null +++ b/.github/workflows/auto-labeler-config.yaml @@ -0,0 +1,24 @@ +--- + +conventional-commits: + - type: 'fix' + nouns: ['FIX', 'Fix', 'fix', 'FIXED', 'Fixed', 'fixed'] + labels: ['bug'] + - type: 'feature' + nouns: ['FEATURE', 'Feature', 'feature', 'FEAT', 'Feat', 'feat'] + labels: ['enhancement'] + - type: 'breaking_change' + nouns: ['BREAKING CHANGE', 'BREAKING', 'MAJOR'] + labels: ['breaking-change'] + - type: 'refactor' + nouns: ['refactor','Refactor'] + labels: ['refactor'] + - type: 'documentation' + nouns: ['doc','document','documentation'] + labels: ['documentation'] + - type: 'build' + nouns: ['build','rebuild'] + labels: ['build'] + - type: 'config' + nouns: ['config', 'conf', 'configuration', 'configure'] + labels: ['config'] diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml new file mode 100644 index 0000000..9b10581 --- /dev/null +++ b/.github/workflows/cla.yaml @@ -0,0 +1,13 @@ +--- +name: CLA Assistant + +on: + issue_comment: + types: [created] + pull_request_target: + types: [opened,closed,synchronize] +jobs: + cla_assistant: + uses: Netcracker/qubership-workflow-hub/.github/workflows/cla.yaml@main + secrets: + personal_access_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} diff --git a/.github/workflows/profanity-filter.yaml b/.github/workflows/profanity-filter.yaml new file mode 100644 index 0000000..1ed41ba --- /dev/null +++ b/.github/workflows/profanity-filter.yaml @@ -0,0 +1,18 @@ +--- +name: Profanity filter + +on: + issue_comment: + types: [created, edited] + issues: + types: [opened, edited, reopened] + pull_request: + types: [opened, edited, reopened] + +permissions: + issues: write + pull-requests: write + +jobs: + call-apply-filter: + uses: Netcracker/qubership-workflow-hub/.github/workflows/profanityFilter.yaml@main diff --git a/.github/workflows/super-linter.yaml b/.github/workflows/super-linter.yaml new file mode 100644 index 0000000..591543e --- /dev/null +++ b/.github/workflows/super-linter.yaml @@ -0,0 +1,14 @@ +--- +name: Lint Code Base + +on: + workflow_call: + + pull_request: + branches: [main] + types: + [opened, reopened] + +jobs: + run-lint: + uses: Netcracker/qubership-workflow-hub/.github/workflows/super-linter.yaml@main