Skip to content

Commit efc9af4

Browse files
authored
ci: notify dependabot PR merges on pull_request closed events (#16381)
1 parent a2f1e07 commit efc9af4

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/dependabot.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
name: dependabot
2+
# Dependabot is annoying, but this makes it a bit less so.
23

34
on:
45
pull_request:
5-
types:
6-
- opened
7-
push:
8-
branches:
9-
- main
6+
types: [opened, closed]
107

118
permissions:
129
contents: read
@@ -15,10 +12,14 @@ permissions:
1512
concurrency: pr-${{ github.ref }}
1613

1714
jobs:
18-
# Dependabot is annoying, but this makes it a bit less so.
1915
dependabot-automerge:
2016
runs-on: ubuntu-latest
21-
if: github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' && github.actor_id == 49699333 && github.repository == 'coder/coder'
17+
if: >
18+
github.event_name == 'pull_request' &&
19+
github.event.action == 'opened' &&
20+
github.event.pull_request.user.login == 'dependabot[bot]' &&
21+
github.actor_id == 49699333 &&
22+
github.repository == 'coder/coder'
2223
permissions:
2324
pull-requests: write
2425
contents: write
@@ -48,7 +49,12 @@ jobs:
4849
dependabot-automerge-notify:
4950
# Send a slack notification when a dependabot PR is merged.
5051
runs-on: ubuntu-latest
51-
if: github.event_name == 'push' && github.actor == 'github-actions[bot]' && github.actor_id == 41898282 && github.repository == 'coder/coder'
52+
if: >
53+
github.event_name == 'pull_request' &&
54+
github.event.action == 'closed' &&
55+
github.event.pull_request.merged == true &&
56+
github.event.pull_request.user.login == 'dependabot[bot]' &&
57+
github.repository == 'coder/coder'
5258
steps:
5359
- name: Send Slack notification
5460
env:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy