diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 0000000..309150f --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,93 @@ +# -------------------------------------------------------------- +# WARNING: This file is managed by centralized sync management system. +# Do not edit this file directly, your changes will be overwritten. +# See https://github.com/orange-cloudavenue/workflows for more information. +# -------------------------------------------------------------- +- name: "enhancement" + color: "a2eeef" + description: "Enhancement" +- name: "community" + color: "FBCA04" + description: "Community related" +- name: "deprecated" + color: "5319E7" + description: "Deprecated feature" + +# Sync +- name: "sync" + color: "0052CC" + description: "Sync" + +# Language +- name: "go" + color: "00ADD8" + description: "Language Golang" + +# Conventional commits (set by Action ) + +- name: "breaking-change" + color: "B60205" + description: "Introduced breaking changes" +- name: "feature" + color: "0E8A16" + description: "New feature" +- name: "fix" + color: "D93F0B" + description: "Bug fix" +- name: "documentation" + color: "0075ca" + description: "Documentation" +- name: "test" + color: "0E8A16" + description: "Test" +- name: "CI/CD" + color: "FBCA04" + description: "CI/CD" +- name: "refactor" + color: "D4C5F9" + description: "Refactor" +- name: "performance" + color: "D4C5F9" + description: "Performance" +- name: "chore" + color: "C2E0C6" + description: "Chore" +- name: "revert" + color: "000000" + description: "Revert" +- name: "WIP" + color: "000000" + description: "Work in progress" + +# Priority +- name: "priority-critical" + color: "B60205" + description: "Priority critical" +- name: "priority-high" + color: "D93F0B" + description: "Priority high" +- name: "priority-medium" + color: "0E8A16" + description: "Priority medium" +- name: "priority-low" + color: "0052CC" + description: "Priority low" + +# PR Size +- name: "size/XS" + color: "0E8A16" + description: "Extra small PR" +- name: "size/S" + color: "0052CC" + description: "Small PR" +- name: "size/M" + color: "FFD700" + description: "Medium PR" +- name: "size/L" + color: "FFA500" + description: "Large PR" +- name: "size/XL" + color: "B60205" + description: "Extra large PR" + + diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..4e61412 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,36 @@ +name: Labeler + +# Labeler manage labels on your GitHub repository based on a YAML file. + +on: + push: + branches: + - 'main' + paths: + - '.github/labels.yml' + - '.github/workflows/labeler.yml' + pull_request: + paths: + - '.github/labels.yml' + - '.github/workflows/labeler.yml' + +jobs: + labeler: + runs-on: ubuntu-latest + permissions: + contents: read + issues: write + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Run Labeler + uses: crazy-max/ghaction-github-labeler@v5 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + yaml-file: .github/labels.yml + dry-run: ${{ github.event_name == 'pull_request' }} + exclude: | + help* + *issue \ No newline at end of file diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..219d2ed --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,46 @@ +# -------------------------------------------------------------- +# WARNING: This file is managed by centralized sync management system. +# Do not edit this file directly, your changes will be overwritten. +# See https://github.com/orange-cloudavenue/workflows for more information. +# -------------------------------------------------------------- +name: PR All events + +on: + pull_request: + +concurrency: + group: ${{ github.ref }}-${{ github.head_ref }}-changelog + cancel-in-progress: true + +permissions: + contents: write + pull-requests: write + +jobs: + changelog-dependabot: + name: "Changelog Dependabot" + uses: orange-cloudavenue/workflows/.github/workflows/changelog_dependabot.yml@main + secrets: + TOKEN: ${{ secrets.GITHUB_TOKEN }} + + + + + pr-size: + name: "PR Size" + uses: orange-cloudavenue/workflows/.github/workflows/pr_label_size.yml@main + secrets: + TOKEN: ${{ secrets.CHANGELOG_PAT }} + + pr-conventional-commits: + name: "Conventional Commits" + uses: orange-cloudavenue/workflows/.github/workflows/pr_conventional_commits.yml@main + secrets: + TOKEN: ${{ secrets.CHANGELOG_PAT }} + + golang-ci-lint: + name: "Lint" + uses: orange-cloudavenue/workflows/.github/workflows/go_golangci-lint.yml@main + tests: + name: "Unit Tests" + uses: orange-cloudavenue/workflows/.github/workflows/go_unit-test.yml@main \ No newline at end of file diff --git a/.github/workflows/pr_open.yml b/.github/workflows/pr_open.yml index 95a23b8..ef0eedf 100644 --- a/.github/workflows/pr_open.yml +++ b/.github/workflows/pr_open.yml @@ -3,10 +3,11 @@ # Do not edit this file directly, your changes will be overwritten. # See https://github.com/orange-cloudavenue/workflows for more information. # -------------------------------------------------------------- -name: PR Open +name: PR Open/Reopen on: - pull_request: + pull_request_target: + types: [ opened, reopened ] concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-changelog @@ -17,30 +18,6 @@ permissions: pull-requests: write jobs: - changelog-dependabot: - name: "Changelog Dependabot" - uses: orange-cloudavenue/workflows/.github/workflows/changelog_dependabot.yml@main - secrets: - TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - - - pr-size: - name: "PR Size" - uses: orange-cloudavenue/workflows/.github/workflows/pr_label_size.yml@main - secrets: - TOKEN: ${{ secrets.CHANGELOG_PAT }} - - pr-conventional-commits: - name: "Conventional Commits" - uses: orange-cloudavenue/workflows/.github/workflows/pr_conventional_commits.yml@main - secrets: - TOKEN: ${{ secrets.CHANGELOG_PAT }} - - golang-ci-lint: - name: "Lint" - uses: orange-cloudavenue/workflows/.github/workflows/go_golangci-lint.yml@main - tests: - name: "Unit Tests" - uses: orange-cloudavenue/workflows/.github/workflows/go_unit-test.yml@main \ No newline at end of file + auto-assign: + name: "Auto Assign" + uses: orange-cloudavenue/workflows/.github/workflows/pr_auto_assign.yml@main