diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1d584c6..52d3732 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,10 +5,14 @@ updates: schedule: interval: daily labels: - - chore + - dependencies + - auto + - no-stale - package-ecosystem: "pip" directory: "/" schedule: interval: weekly labels: - - chore + - dependencies + - auto + - no-stale diff --git a/.github/labels.yml b/.github/labels.yml index e7edee5..b0297d1 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -1,4 +1,7 @@ --- +- name: "auto" + color: bfdadc + description: "Marks a PR or issue that has been created automatically." - name: "breaking-change" color: ee0701 description: "A breaking change for existing users." @@ -38,7 +41,7 @@ description: "There has not been activity on this issue or PR for quite some time." - name: "no-stale" color: fef2c0 - description: "This issue or PR is exempted from the stable bot." + description: "This issue or PR is exempted from the stale bot." - name: "security" color: ee0701 diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 0a461a9..3f95967 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,38 +1,54 @@ +--- name-template: 'v$RESOLVED_VERSION ๐ŸŒˆ' tag-template: 'v$RESOLVED_VERSION' change-template: '- $TITLE @$AUTHOR (#$NUMBER)' change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. + categories: - - title: '๐Ÿš€ Features' + - title: '๐Ÿšจ Breaking changes' labels: - - 'enhancement' - - 'refactor' + - 'breaking-change' + - title: 'โœจ New features' + labels: + - 'new-feature' - title: '๐Ÿ› Bug Fixes' labels: - - 'bug' + - 'bugfix' + - title: '๐Ÿš€ Enhancements' + labels: + - 'enhancement' + - 'refactor' + - 'performance' - title: '๐Ÿงฐ Maintenance' - label: 'chore' -template: | - ## Changes + labels: + - 'maintenance' + - 'ci' + - title: '๐Ÿ“š Documentation' + labels: + - 'documentation' + - title: 'โฌ†๏ธ Dependency updates' + labels: + - 'dependencies' - $CHANGES version-resolver: major: labels: - - 'breaking change' + - 'major' + - 'breaking-change' minor: labels: + - 'minor' + - 'new-feature' + patch: + labels: + - 'bugfix' + - 'dependencies' - 'enhancement' + - 'performance' + - 'refactor' default: patch -autolabeler: - - label: 'bug' - branch: - - '/fix\/.+/' - title: - - '/fix/i' - - label: 'enhancement' - branch: - - '/feature\/.+/' - - label: 'chore' - branch: - - '/chore\/.+/' + +template: | + ## Changes + + $CHANGES diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 0000000..fba0d22 --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,20 @@ +--- +name: Lock + +on: + schedule: + - cron: "0 5 * * *" + workflow_dispatch: + +jobs: + lock: + name: ๐Ÿ”’ Lock closed issues and PRs + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v5.0.1 + with: + github-token: ${{ github.token }} + issue-inactive-days: "30" + issue-lock-reason: "" + pr-inactive-days: "1" + pr-lock-reason: "" diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 019e0e7..5f54d18 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -2,18 +2,16 @@ name: PR Labels on: - pull_request: + pull_request_target: types: + - opened - synchronize - labeled - unlabeled - branches: - - master - -permissions: {} + workflow_call: jobs: - pr_labels: + pr-labels: name: Verify runs-on: ubuntu-latest steps: @@ -21,4 +19,11 @@ jobs: uses: ludeeus/action-require-labels@1.1.0 with: labels: >- - breaking-change, bugfix, chore, dependencies, documentation, enhancement, new-feature, refactor + breaking-change, bugfix, + ci, + dependencies, documentation, + enhancement, + maintenance, + new-feature, + performance, + refactor diff --git a/.github/workflows/pre-commit-updater.yml b/.github/workflows/pre-commit-updater.yml index 51250d3..7417f52 100644 --- a/.github/workflows/pre-commit-updater.yml +++ b/.github/workflows/pre-commit-updater.yml @@ -32,4 +32,4 @@ jobs: body: | Update versions of tools in pre-commit configs to latest version - labels: dependencies + labels: dependencies, auto, no-stale diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 528a28b..cbc8a56 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -1,17 +1,19 @@ -# Utilize release drafter action - +--- name: Release Drafter on: push: branches: - master + workflow_dispatch: + jobs: update_release_draft: + name: ๐Ÿ“ Draft release runs-on: ubuntu-latest steps: - # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v6.0.0 + - name: ๐Ÿš€ Run Release Drafter + uses: release-drafter/release-drafter@v6.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..481ed26 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,39 @@ +--- +name: Stale + +on: + schedule: + - cron: "0 3 * * *" + workflow_dispatch: + +jobs: + stale: + name: ๐Ÿงน Clean up stale issues and PRs + runs-on: ubuntu-latest + steps: + - name: ๐Ÿš€ Run stale + uses: actions/stale@v9.0.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-stale: 14 + days-before-close: 7 + remove-stale-when-updated: true + stale-issue-label: "stale" + exempt-issue-labels: "no-stale,help-wanted" + stale-issue-message: > + There hasn't been any activity on this issue recently, so we + clean up some of the older and inactive issues. + + Please make sure to update to the latest version and + check if that solves the issue. Let us know if that works for you + by leaving a comment ๐Ÿ‘ + + This issue has now been marked as stale and will be closed if no + further activity occurs. Thanks! + stale-pr-label: "stale" + exempt-pr-labels: "no-stale" + stale-pr-message: > + There hasn't been any activity on this pull request recently. This + pull request has been automatically marked as stale because of that + and will be closed if no further activity occurs within 7 days. + Thank you for your contributions. diff --git a/.github/workflows/typing-linting.yml b/.github/workflows/typing-linting.yml index 446d0eb..4f0405d 100644 --- a/.github/workflows/typing-linting.yml +++ b/.github/workflows/typing-linting.yml @@ -25,4 +25,17 @@ jobs: - name: ๐Ÿšง Install dependencies run: pip install . .[test] - name: ๐Ÿš€ Run pre-commit hooks - run: pre-commit run --all --all-files + run: | + pre-commit run check-yaml --all-files + pre-commit run check-toml --all-files + pre-commit run check-ast --all-files + pre-commit run check-docstring-first --all-files + pre-commit run debug-statements --all-files + pre-commit run end-of-file-fixer --all-files + pre-commit run trailing-whitespace --all-files + pre-commit run ruff --all-files + pre-commit run ruff-format --all-files + pre-commit run black --all-files + pre-commit run codespell --all-files + pre-commit run mypy --all-files + pre-commit run pylint --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ff3fdb6..f427fba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,6 +19,8 @@ repos: name: โฎ Trailing whitespace - id: no-commit-to-branch name: ๐Ÿ›‘ No commit to master branch + args: + - --branch=master - repo: https://github.com/charliermarsh/ruff-pre-commit rev: v0.2.1 hooks: