1
1
name :dependabot
2
+ # Dependabot is annoying, but this makes it a bit less so.
2
3
3
4
on :
4
5
pull_request :
5
- types :
6
- -opened
7
- push :
8
- branches :
9
- -main
6
+ types :[opened, closed]
10
7
11
8
permissions :
12
9
contents :read
@@ -15,10 +12,14 @@ permissions:
15
12
concurrency :pr-${{ github.ref }}
16
13
17
14
jobs :
18
- # Dependabot is annoying, but this makes it a bit less so.
19
15
dependabot-automerge :
20
16
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'
22
23
permissions :
23
24
pull-requests :write
24
25
contents :write
48
49
dependabot-automerge-notify :
49
50
# Send a slack notification when a dependabot PR is merged.
50
51
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'
52
58
steps :
53
59
-name :Send Slack notification
54
60
env :