From 9b76b274a319b0e5534a858c9feb430ba9de9a0e Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Thu, 10 Oct 2024 17:04:03 +0200 Subject: [PATCH] chore: create notifiation instead of creating an issue --- .github/workflows/check-latest-node.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-latest-node.yml b/.github/workflows/check-latest-node.yml index 1a01014..3488538 100644 --- a/.github/workflows/check-latest-node.yml +++ b/.github/workflows/check-latest-node.yml @@ -50,13 +50,13 @@ jobs: https://api.github.com/repos/${{ github.repository }}/actions/workflows/patch-node.yml/dispatches \ -d '{"ref":"main","inputs":{"nodeVersion":"${{ steps.compare.outputs.latest_version }}","patchFile":"${{ steps.compare.outputs.patch_version }}"}}' - # create new issue if patch is outdated - - name: Create issue + # send a notification to the repository owner if the patch is outdated + - name: Notify if: steps.compare.outputs.outdated == 'true' run: | - echo "Creating issue for outdated patch for Node.js ${{ matrix.node-version }}" + echo "Sending notification to repository owner" curl -X POST \ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/${{ github.repository }}/issues \ - -d '{"title":"Bump patch for Node.js from ${{ steps.compare.outputs.patch_version }} to ${{ steps.compare.outputs.latest_version }}","body":"The patch for Node.js ${{ matrix.node-version }} is outdated. Please create a new patch."}' + https://api.github.com/repos/${{ github.repository }}/dispatches \ + -d '{"event_type":"notify","client_payload":{"message":"Patch for Node.js ${{ matrix.node-version }} is outdated"}}'