From f5c9c5815239324973e74bcc321b899c675c55d4 Mon Sep 17 00:00:00 2001 From: Mark Rosenberg <38965626+markdoeswork@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:48:14 -0400 Subject: [PATCH] Rc comment with package links (#3720) **What does this PR do?** A clear and concise description with your runway ticket url. Take 2 on https://runway.powerhrg.com/backlog_items/PLAY-1526 This is the original pr https://github.com/powerhome/playbook/pull/3717 If this doesn't work again its because the master branch isn't remembering the pr that just merged. I'll test this on a dummy repo that i can willy nilly merge master to --- .../workflows/github-actions-release-candidate.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/github-actions-release-candidate.yml b/.github/workflows/github-actions-release-candidate.yml index e3a32610b7..b094ac59fb 100644 --- a/.github/workflows/github-actions-release-candidate.yml +++ b/.github/workflows/github-actions-release-candidate.yml @@ -104,6 +104,7 @@ jobs: --notes "This is a release candidate version. Please test thoroughly before promoting to a stable release." \ --prerelease - name: Leave PR comment + uses: actions/github-script@v7 env: PR_NUMBER: ${{ github.event.pull_request.number }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -111,8 +112,11 @@ jobs: RUBY_GEM_LINK: https://rubygems.org/gems/playbook_ui/versions/${{env.new_ruby_version}} NPM_VERSION: ${{ env.new_npm_version }} NPM_LINK: https://www.npmjs.com/package/playbook-ui/v/${{env.new_npm_version}} - run: | - curl -H "Authorization: token ${GITHUB_TOKEN}" \ - -X POST \ - -d '{"body": "Release Candidate Created \n\n Your RC for Ruby Gems is [${{env.RUBY_GEM_VERSION}}](${{env.RUBY_GEM_LINK}}) \n\n Your RC for NPM is [${{env.NPM_VERSION}}](${{env.NPM_LINK}}) "}' \ - "https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments" + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: "Release Candidate Created \n\n Your RC for Ruby Gems is [${{env.RUBY_GEM_VERSION}}](${{env.RUBY_GEM_LINK}}) \n\n Your RC for NPM is [${{env.NPM_VERSION}}](${{env.NPM_LINK}})" + })