Skip to content

Commit b779b23

Browse files
authored
Merge pull request #55 from square/joanc/DEX-6970-automerge
adding automerge github action for generated prs
2 parents 7f3d64d + 49bf55f commit b779b23

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.github/labeler.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# configuration settings for labeler
2+
3+
version: v1
4+
5+
labels:
6+
- label: "automerge"
7+
sync: true
8+
matcher:
9+
title: "^Generated PR for Release:"
10+
11+
- label: "automerge-author"
12+
sync: true
13+
matcher:
14+
author:
15+
- square-sdk-deployer
16+
17+
- label: "automerge-branch"
18+
sync: true
19+
matcher:
20+
branch: "^release"

.github/workflows/automerge.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will trigger an automerge
2+
# Checks PR title, author, and branch name.
3+
# If the properties match a generated SDK PR,
4+
# corresponding labels are applied with labeler
5+
# and triggers automerge.
6+
7+
name: Automerge
8+
on:
9+
pull_request:
10+
branches: [ master, main ]
11+
pull_request_review:
12+
types:
13+
- submitted
14+
check_suite:
15+
types:
16+
- completed
17+
status: {}
18+
jobs:
19+
labeler:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: automerge-labeler
23+
uses: fuxingloh/multi-labeler@v1
24+
25+
automerge:
26+
needs: labeler
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: automerge
30+
uses: "pascalgn/[email protected]"
31+
env:
32+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
33+
MERGE_LABELS: "automerge,automerge-branch,automerge-author"

0 commit comments

Comments
 (0)