mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
ci: merge approval and notify jobs (#16403)
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
name: dependabot
|
||||
# Dependabot is annoying, but this makes it a bit less so.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, closed]
|
||||
types:
|
||||
- opened
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
# Only run one instance per PR to ensure in-order execution.
|
||||
concurrency: pr-${{ github.ref }}
|
||||
|
||||
jobs:
|
||||
dependabot-automerge:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -46,16 +43,6 @@ jobs:
|
||||
PR_URL: ${{github.event.pull_request.html_url}}
|
||||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
|
||||
dependabot-automerge-notify:
|
||||
# Send a slack notification when a dependabot PR is merged.
|
||||
runs-on: ubuntu-latest
|
||||
if: >
|
||||
github.event_name == 'pull_request' &&
|
||||
github.event.action == 'closed' &&
|
||||
github.event.pull_request.merged == true &&
|
||||
github.event.pull_request.user.login == 'dependabot[bot]' &&
|
||||
github.repository == 'coder/coder'
|
||||
steps:
|
||||
- name: Send Slack notification
|
||||
env:
|
||||
PR_URL: ${{github.event.pull_request.html_url}}
|
||||
@@ -71,7 +58,7 @@ jobs:
|
||||
"type": "header",
|
||||
"text": {
|
||||
"type": "plain_text",
|
||||
"text": ":pr-merged: Auto merged Dependabot PR #${{ env.PR_NUMBER }}",
|
||||
"text": ":pr-merged: Auto merge enabled for Dependabot PR #${{ env.PR_NUMBER }}",
|
||||
"emoji": true
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user