Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add dependabot auto-merge #26

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/auto_approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,16 @@ jobs:
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: approve and enable auto-merge
run: |
gh pr review --approve "$PR_URL"
gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: second approval
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.APPROVAL_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/release_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
# Run semantic-release to generate new changelog
pip install --upgrade hatch
hatch env create release
hatch run release:deps
NEXT_SEMVER=$(hatch run release:bump $BUMP_ARGS)

# Grab the new version's changelog and prepend it to the original changelog contents
Expand Down
4 changes: 1 addition & 3 deletions hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ test = "pytest --no-cov {args:test/*/e2e}"

[envs.release]
detached = true
dependencies = [
"python-semantic-release == 8.7.*"
]

[envs.release.scripts]
deps = "pip install -r requirements-release.txt"
bump = "semantic-release -v --strict version --no-push --no-commit --no-tag --skip-build {args}"
version = "semantic-release -v --strict version --print {args}"
2 changes: 0 additions & 2 deletions requirements-release.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# HACK: This file solely exists for dependabot checks. The actual dependencies are in `hatch.toml` in the `release` environment.
# If dependabot opens a PR that modifies this file, please make sure to update the coresponding dependency in `hatch.toml` as well.
python-semantic-release == 8.7.*