Skip to content

Commit

Permalink
fix(auto-merge): exclude pre-1.0.0 major changes (#536)
Browse files Browse the repository at this point in the history
"(...) Cargo uses the convention that only changes in the left-most non-zero component are considered incompatible."

See: https://doc.rust-lang.org/cargo/reference/semver.html
  • Loading branch information
caugner authored Jul 12, 2024
1 parent 9a708f8 commit dab5a4c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@ jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'

steps:
- uses: ahmadnassri/[email protected]
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: ${{ secrets.AUTOMERGE_TOKEN }}
command: "squash and merge"
approve: true
target: minor

- name: Squash and merge

if: ${{ steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor' && !startsWith(steps.dependabot-metadata.outputs.previous-version, '0.') || steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' && !startsWith(steps.dependabot-metadata.outputs.previous-version, '0.0.') }}
env:
GITHUB_TOKEN: ${{ secrets.AUTOMERGE_TOKEN }}
run: gh pr comment ${{ github.event.pull_request.html_url }} --body "@dependabot squash and merge"

0 comments on commit dab5a4c

Please sign in to comment.