Skip to content

Commit 7111f2b

Browse files
Merge pull request #11 from aws-github-ops/automation
chore: add automerge action
2 parents 3df9fb5 + 12ae4c6 commit 7111f2b

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

.github/workflows/automerge.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Automatically Merge Approved PRs
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- labeled
9+
- reopened
10+
pull_request_review:
11+
types:
12+
- submitted
13+
check_suite:
14+
types:
15+
- completed
16+
17+
jobs:
18+
automerge:
19+
name: Automerge
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Automatically Merge
23+
uses: NGL321/automerge-action@main
24+
env:
25+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
26+
LOG: "TRACE"
27+
MERGE_LABELS: "!pr/do-not-merge"
28+
MERGE_METHOD: "squash"
29+
MERGE_COMMIT_MESSAGE: "pull-request-title-and-description"
30+
MERGE_DELETE_BRANCH: "true"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Closed Issue Message
2+
on:
3+
issues:
4+
types: [closed]
5+
jobs:
6+
auto_comment:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: aws-actions/closed-issue-message@v1
10+
with:
11+
# These inputs are both required
12+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
13+
message: |
14+
### ⚠️COMMENT VISIBILITY WARNING⚠️
15+
Comments on closed issues are hard for our team to see.
16+
If you need more assistance, please either tag a team member or open a new issue that references this one.
17+
If you wish to keep having a conversation with other community members under this issue feel free to do so.

.github/workflows/semantic-pr.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Semantic PRs Failed
2+
3+
on:
4+
pull_request:
5+
check_suite:
6+
types: [completed]
7+
8+
jobs:
9+
failed-cc:
10+
name: Failed Conventional Commits
11+
if: >
12+
github.event.check_suite.app.name == 'Semantic Pull Request'
13+
&& github.event.check_suite.conclusion == 'failure'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: peter-evans/create-or-update-comment@v1
17+
with:
18+
issue-number: ${{ github.event.pull_request}}
19+
body: |
20+
Title does not follow the guidelines of [Conventional Commits](https://www.conventionalcommits.org).
21+
Please adjust title before merge.

0 commit comments

Comments
 (0)