diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f8827a2..e2cac91 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,7 +4,7 @@ updates: - package-ecosystem: pip directory: / schedule: - interval: daily + interval: monthly open-pull-requests-limit: 20 reviewers: - worgarside @@ -12,13 +12,13 @@ updates: - package-ecosystem: github-actions directory: / schedule: - interval: daily + interval: monthly reviewers: - worgarside - package-ecosystem: npm directory: / schedule: - interval: daily + interval: monthly reviewers: - worgarside diff --git a/.github/labeler.yml b/.github/labeler.yml index 074a80e..6f41d25 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -13,7 +13,7 @@ labels: - label: dependencies files: - ^Pipfile\.lock$ - - ^poetry\.lock$ + - ^uv\.lock$ - ^requirements\.txt$ - label: dependencies diff --git a/.github/repo_labels.yml b/.github/repo_labels.yml index 6fa3cb3..e698c62 100644 --- a/.github/repo_labels.yml +++ b/.github/repo_labels.yml @@ -9,19 +9,10 @@ color: 8B4513 description: Regular code maintenance - - name: bot:delete-on-merge - description: Delete this branch after merging (bot command) - color: 8B0000 - - name: bot:do-not-close description: Do not close this PR, even if it's empty (bot command) color: 2C6AAB - - name: bot:keep-updated - from_name: keep-updated - description: Keep this PR updated from its base branch (bot command) - color: 87FAA6 - - name: dependencies description: Pull requests that update a dependency file color: 0366D6 diff --git a/.github/workflows/auto-create-pr.yml b/.github/workflows/auto-create-pr.yml new file mode 100644 index 0000000..f0e6cfd --- /dev/null +++ b/.github/workflows/auto-create-pr.yml @@ -0,0 +1,21 @@ +--- +name: Auto-Create PR + +on: + push: + branches-ignore: + - main + - dependabot/** + workflow_dispatch: + +jobs: + create-pr: + name: Create PR + # yamllint disable-line rule:line-length + uses: worgarside/github-config-files/.github/workflows/__create-pull-request.yml@0.3.3 + with: + base-ref-name: ${{ github.event.repository.default_branch }} + head-ref-name: ${{ github.ref_name }} + pr-draft: true + update-pr-body-if-exists: true + secrets: inherit diff --git a/.github/workflows/ci_deployment.yml b/.github/workflows/ci_deployment.yml index bea320a..03a511f 100644 --- a/.github/workflows/ci_deployment.yml +++ b/.github/workflows/ci_deployment.yml @@ -9,9 +9,9 @@ on: jobs: ci-validation: name: 'CI: Validation' - uses: worgarside/github-config-files/.github/workflows/__ci_validation.yml@main + uses: worgarside/github-config-files/.github/workflows/__ci-validation.yml@0.3.3 with: - build-branch: ${{ github.ref }} + build-branch: '${{ github.ref }}' build-type: '' node-build-directory: '' python-version: '3.12' @@ -29,16 +29,16 @@ jobs: id-token: write contents: read pages: write - uses: worgarside/github-config-files/.github/workflows/__ci_deployment.yml@main + uses: worgarside/github-config-files/.github/workflows/__ci-deployment.yml@0.3.3 with: - build-branch: ${{ github.ref }} + build-branch: '${{ github.ref }}' build-type: '' deploy-to: '' deploy-documentation: '' node-build-directory: '' path-to-__version__-file: '' python-version: '3.12' - release-tag: ${{ needs.ci-validation.outputs.release-tag }} + release-tag: '${{ needs.ci-validation.outputs.release-tag }}' unit-test: '' update-pyproject-toml: 'true' update-json-file-path: '' diff --git a/.github/workflows/ci_validation.yml b/.github/workflows/ci_validation.yml index 874317d..04d03ef 100644 --- a/.github/workflows/ci_validation.yml +++ b/.github/workflows/ci_validation.yml @@ -12,9 +12,9 @@ on: jobs: ci-validation: name: 'CI: Validation' - uses: worgarside/github-config-files/.github/workflows/__ci_validation.yml@main + uses: worgarside/github-config-files/.github/workflows/__ci-validation.yml@0.3.3 with: - build-branch: ${{ github.ref }} + build-branch: '${{ github.ref }}' build-type: '' node-build-directory: '' python-version: '3.12' diff --git a/.github/workflows/manage-pr.yml b/.github/workflows/manage-pr.yml new file mode 100644 index 0000000..c3abb46 --- /dev/null +++ b/.github/workflows/manage-pr.yml @@ -0,0 +1,44 @@ +--- +name: Manage PR + +on: + pull_request: + types: + - labeled + - unlabeled + - opened + - reopened + - synchronize + - ready_for_review + - auto_merge_enabled + - auto_merge_disabled + +concurrency: + # yamllint disable-line rule:line-length + group: manage-pr-${{ github.event.pull_request.number }}-${{ github.event.action }} + cancel-in-progress: true + +jobs: + manage-pr-labels: + name: Manage PR Labels + uses: worgarside/github-config-files/.github/workflows/__manage-pr-labels.yml@0.3.3 + permissions: + contents: read + pull-requests: write + with: + head-ref: ${{ github.head_ref }} + pr-author: ${{ github.event.pull_request.user.login }} + pr-number: ${{ github.event.pull_request.number }} + secrets: inherit + + close-empty-pr: + name: Close Empty PR + uses: worgarside/github-config-files/.github/workflows/__close-empty-pr.yml@0.3.3 + if: github.event.pull_request.state == 'open' + permissions: + contents: read + pull-requests: write + with: + head-ref: ${{ github.head_ref }} + pr-number: ${{ github.event.pull_request.number }} + secrets: inherit diff --git a/.github/workflows/manage-repo-labels.yml b/.github/workflows/manage-repo-labels.yml new file mode 100644 index 0000000..82b223d --- /dev/null +++ b/.github/workflows/manage-repo-labels.yml @@ -0,0 +1,18 @@ +--- +name: Manage Repo Labels + +on: + push: + branches: + - main + paths: + - .github/repo_labels.yml + - .github/workflows/manage-repo-labels.yml + workflow_dispatch: + +jobs: + manage-repo-labels: + name: Manage Repo Labels + uses: worgarside/github-config-files/.github/workflows/__manage-repo-labels.yml@0.3.3 + permissions: + issues: write diff --git a/.github/workflows/set-pr-auto-merge.yml b/.github/workflows/set-pr-auto-merge.yml new file mode 100644 index 0000000..4707749 --- /dev/null +++ b/.github/workflows/set-pr-auto-merge.yml @@ -0,0 +1,25 @@ +--- +name: Set PR Auto Merge + +# yamllint disable-line rule:truthy +on: + pull_request: + types: + - opened + - ready_for_review + +concurrency: + group: set-auto-merge-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + set-auto-merge: + name: Set PR Auto Merge + if: ${{ !github.event.pull_request.draft }} + uses: worgarside/github-config-files/.github/workflows/__set-pr-auto-merge.yml@0.3.3 + with: + head-ref: ${{ github.head_ref }} + pr-html-url: ${{ github.event.pull_request.html_url }} + pr-number: ${{ github.event.pull_request.number }} + pr-title: ${{ github.event.pull_request.title }} + secrets: inherit