diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e5beee5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +# Docs: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically +version: 2 +enable-beta-ecosystems: true +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + labels: + - "dependencies" + commit-message: + prefix: "chore" + include: "scope" diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..ac43d51 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,3 @@ +GitHub: +- changed-files: + - any-glob-to-any-file: '.github/**/*' diff --git a/.github/workflows/README.txt b/.github/workflows/README.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/workflows/README.txt @@ -0,0 +1 @@ + diff --git a/.github/workflows/auto-assign-pr.yml b/.github/workflows/auto-assign-pr.yml new file mode 100644 index 0000000..a41dafb --- /dev/null +++ b/.github/workflows/auto-assign-pr.yml @@ -0,0 +1,20 @@ +# .github/workflows/auto-author-assign.yml +name: 'Auto-Assign Author to Pull Requests' + +on: + pull_request_target: + types: [opened, reopened] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + pull-requests: write + +jobs: + assign-author: + runs-on: ubuntu-latest + steps: + - uses: toshimaru/auto-author-assign@v2.1.1 + diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 0000000..c201024 --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,27 @@ +# This workflow will triage pull requests and apply a label based on the +# paths that are modified in the pull request. +# +# To use this workflow, you will need to set up a .github/labeler.yml +# file with configuration. For more information, see: +# https://github.com/actions/labeler + +name: Automatically add relevant labels to Pull Requests +on: +- pull_request_target + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + label: + runs-on: ubuntu-latest + #if: github.event.pull_request.head.repo.full_name == github.repository + #if: ${{ github.repository_owner == 'openfoodfacts' }} + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/merge-conflict-autolabel.yml b/.github/workflows/merge-conflict-autolabel.yml new file mode 100644 index 0000000..c8d7589 --- /dev/null +++ b/.github/workflows/merge-conflict-autolabel.yml @@ -0,0 +1,20 @@ +name: "Maintenance" +on: + # So that PRs touching the same files as the push are updated + push: + # So that the `dirtyLabel` is removed if conflicts are resolve + # We recommend `pull_request_target` so that github secrets are available. + # In `pull_request` we wouldn't be able to change labels of fork PRs + pull_request_target: + types: [synchronize] + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: Check for merge conflicts + uses: eps1lon/actions-label-merge-conflict@releases/2.x + with: + dirtyLabel: "PR: needs rebase" + removeOnDirtyLabel: "PR: ready to ship" + repoToken: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/semantic-pr.yml b/.github/workflows/semantic-pr.yml new file mode 100644 index 0000000..4638e85 --- /dev/null +++ b/.github/workflows/semantic-pr.yml @@ -0,0 +1,29 @@ +name: "Semantic PRs" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + fix + feat + docs + ci + refactor + chore diff --git a/.github/workflows/top-issues.yml b/.github/workflows/top-issues.yml new file mode 100644 index 0000000..e93e722 --- /dev/null +++ b/.github/workflows/top-issues.yml @@ -0,0 +1,27 @@ +name: Top issues action. +#on: +# schedule: +# - cron: '0 0 */1 * *' +on: + issues: + types: [opened, transferred] + +jobs: + ShowAndLabelTopIssues: + name: Display and label top issues. + runs-on: ubuntu-latest + steps: + - name: Run top issues action + uses: rickstaa/top-issues-action@v1 + env: + github_token: ${{ secrets.GITHUB_TOKEN }} + with: + label: true + dashboard: true + dashboard_title: 👍 Top Issues Dashboard + dashboard_show_total_reactions: true + top_issues: true + top_bugs: true + top_features: true + top_pull_requests: true + top_list_size: 20