Skip to content

Commit 4d8825f

Browse files
Add and update GitHub repository configuration files (#7)
Introduce CODEOWNERS, Dependabot auto-merge workflow, and a comprehensive GitHub settings guide. Update issue and pull request templates for clarity and consistency. Enhance dependabot.yml with improved grouping, scheduling, and labeling. Improve README formatting and instructions. ## Description Please include a summary of the change and which issue is fixed. ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update ## Checklist - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with `make test`
1 parent 5c8a543 commit 4d8825f

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

.github/workflows/dependabot-auto-merge.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
name: Dependabot Auto-Merge
22

3-
on: pull_request
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
46

57
permissions:
68
contents: write
79
pull-requests: write
810

11+
# Prevent multiple runs on the same PR
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
14+
cancel-in-progress: false
15+
916
jobs:
1017
dependabot-auto-merge:
1118
runs-on: ubuntu-latest
12-
if: github.actor == 'dependabot[bot]'
19+
# Only run for Dependabot PRs that are not drafts
20+
if: |
21+
github.actor == 'dependabot[bot]' &&
22+
github.event.pull_request.draft == false
1323
1424
steps:
1525
- name: Fetch Dependabot metadata
@@ -34,11 +44,17 @@ jobs:
3444
PR_URL: ${{ github.event.pull_request.html_url }}
3545
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3646

37-
- name: Auto-merge patch and minor updates
47+
- name: Enable auto-merge for patch updates
48+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
49+
run: gh pr merge --auto --squash "$PR_URL"
50+
env:
51+
PR_URL: ${{ github.event.pull_request.html_url }}
52+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
54+
- name: Enable auto-merge for minor dev dependency updates
3855
if: |
39-
steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
40-
(steps.metadata.outputs.update-type == 'version-update:semver-minor' &&
41-
steps.metadata.outputs.dependency-type == 'direct:development')
56+
steps.metadata.outputs.update-type == 'version-update:semver-minor' &&
57+
steps.metadata.outputs.dependency-type == 'direct:development'
4258
run: gh pr merge --auto --squash "$PR_URL"
4359
env:
4460
PR_URL: ${{ github.event.pull_request.html_url }}

0 commit comments

Comments
 (0)