From 65b3b25948223433291e264020839cc72c48956f Mon Sep 17 00:00:00 2001 From: hc-github-team-consul-core Date: Thu, 20 Jul 2023 12:14:15 -0400 Subject: [PATCH] Backport of Fix Backport Assistant PR commenting into release/1.16.x (#18203) * backport of commit de63f65b1c4f605c4529f38763cd1e15ad94e082 * backport of commit f6c0fff6cea9afd69e323a9454a54eb7299eef05 --------- Co-authored-by: Michael Zalimeni --- .github/workflows/backport-assistant.yml | 2 +- .github/workflows/backport-reminder.yml | 29 ------------------------ 2 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 .github/workflows/backport-reminder.yml diff --git a/.github/workflows/backport-assistant.yml b/.github/workflows/backport-assistant.yml index fffa774d3..17462f811 100644 --- a/.github/workflows/backport-assistant.yml +++ b/.github/workflows/backport-assistant.yml @@ -40,4 +40,4 @@ jobs: curl -s -H "Authorization: token ${{ secrets.PR_COMMENT_TOKEN }}" \ -X POST \ -d "{ \"body\": \"${github_message}\"}" \ - "https://api.github.com/repos/${GITHUB_REPOSITORY}/pull/${{ github.event.pull_request.number }}/comments" + "https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${{ github.event.pull_request.number }}/comments" diff --git a/.github/workflows/backport-reminder.yml b/.github/workflows/backport-reminder.yml deleted file mode 100644 index b358122db..000000000 --- a/.github/workflows/backport-reminder.yml +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -# This workflow sends a reminder comment to PRs that have labels starting with -# `backport/` to check that the backport has run successfully. - -name: Backport Assistant Reminder - -on: - pull_request: - types: [ labeled ] - # Runs on PRs to main and all release branches - branches: - - main - - release/* - -jobs: - backport-label-check: - if: "startsWith(github.event.label.name, 'backport/')" - runs-on: ubuntu-latest - - steps: - - name: Comment on PR - run: | - github_message="After merging, confirm that you see linked PRs AND check them for CI errors." - curl -s -H "Authorization: token ${{ secrets.PR_COMMENT_TOKEN }}" \ - -X POST \ - -d "{ \"body\": \"${github_message}\"}" \ - "https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${{ github.event.pull_request.number }}/comments"