Skip to content

Bump xunit.runner.visualstudio from 2.5.4 to 3.1.4 #4

Bump xunit.runner.visualstudio from 2.5.4 to 3.1.4

Bump xunit.runner.visualstudio from 2.5.4 to 3.1.4 #4

# This script seperate major and minor but we do merge them into the same branch.
# Having two steps allows us to easily turn off major changes in future and then script them to their own branch and pipeline.
name: Auto-merge Dependabot PRs into collected branch
on:
pull_request:
types: [opened, synchronize]
branches: [Automatic_version_update_dependabot] # Make sure this matches your actual branch name
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Extract update type
id: extract
run: |
PR_TITLE="${{ github.event.pull_request.title }}"
if [[ $PR_TITLE == *"(major)"* ]]; then
echo "update_type=major" >> $GITHUB_OUTPUT
else
echo "update_type=minor_or_patch" >> $GITHUB_OUTPUT
fi
- name: Auto-merge minor and patch updates
if: steps.extract.outputs.update_type == 'minor_or_patch'
run: gh pr merge --auto --squash "${{ github.event.pull_request.html_url }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Auto-merge major updates
if: steps.extract.outputs.update_type == 'major'
run: gh pr merge --auto --squash "${{ github.event.pull_request.html_url }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}