Skip to content

Commit 5311db4

Browse files
authored
Merge pull request #164 from Flashky/Flashky-patch-2
Flashky patch 2
2 parents e2d6802 + 813d5b5 commit 5311db4

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/automerge.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Dependabot Auto-Merge
2+
3+
# Dependabot Pull Requests Auto-Merge
4+
5+
# The auto-merge will be performed only if the semantic version for the changes is MINOR or PATCH.
6+
# Pull Requests with semantic versions MAJOR will need manual review and approval.
7+
8+
on:
9+
pull_request:
10+
branches: ["master", "main"]
11+
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
16+
jobs:
17+
dependabot-automerge:
18+
runs-on: ubuntu-latest
19+
# Solo si es Dependabot
20+
if: github.actor == 'dependabot[bot]'
21+
22+
steps:
23+
- name: Metadata de Dependabot
24+
id: metadata
25+
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b #v2.4.0
26+
with:
27+
github-token: "${{ secrets.GITHUB_TOKEN }}"
28+
29+
# Este paso maneja AMBOS casos (pom.xml y workflows) automáticamente.
30+
# fetch-metadata analiza el cambio de versión (SemVer), no el tipo de archivo.
31+
- name: Activar Auto-Merge
32+
# Solo Minor y Patch
33+
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
34+
run: gh pr merge --auto --squash "$PR_URL"
35+
env:
36+
PR_URL: ${{ github.event.pull_request.html_url }}
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,5 @@ git clone https://github.com/Flashky/advent-of-code-{year}.git --recurse-submodu
140140
## About
141141

142142
- [Advent of Code](https://adventofcode.com/{year}/about)
143+
144+

0 commit comments

Comments
 (0)