From 368c5e370eab17b764d74660e15559244dd94b04 Mon Sep 17 00:00:00 2001 From: M Atif Ali Date: Mon, 3 Feb 2025 16:55:48 +0500 Subject: [PATCH] ci: try to notify when dependabot PRs gets closed For some reason, the workaround in #16343 did not work, although it should have. This PR changes the approach and tries to notify on PR closed events with the `pull_request` trigger. --- .github/workflows/dependabot.yaml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dependabot.yaml b/.github/workflows/dependabot.yaml index 79c2f89dbec5d..e2e953aab22c4 100644 --- a/.github/workflows/dependabot.yaml +++ b/.github/workflows/dependabot.yaml @@ -1,12 +1,9 @@ name: dependabot +# Dependabot is annoying, but this makes it a bit less so. on: pull_request: - types: - - opened - push: - branches: - - main + types: [opened, closed] permissions: contents: read @@ -15,10 +12,14 @@ permissions: concurrency: pr-${{ github.ref }} jobs: - # Dependabot is annoying, but this makes it a bit less so. dependabot-automerge: runs-on: ubuntu-latest - if: github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' && github.actor_id == 49699333 && github.repository == 'coder/coder' + if: > + github.event_name == 'pull_request' && + github.event.action == 'opened' && + github.event.pull_request.user.login == 'dependabot[bot]' && + github.actor_id == 49699333 && + github.repository == 'coder/coder' permissions: pull-requests: write contents: write @@ -48,7 +49,12 @@ jobs: dependabot-automerge-notify: # Send a slack notification when a dependabot PR is merged. runs-on: ubuntu-latest - if: github.event_name == 'push' && github.actor == 'github-actions[bot]' && github.actor_id == 41898282 && github.repository == 'coder/coder' + 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: 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