Skip to content

Commit

Permalink
[PLAY-1526] Add comment script (#3717)
Browse files Browse the repository at this point in the history
**What does this PR do?** A clear and concise description with your
runway ticket url.
Runway https://runway.powerhrg.com/backlog_items/PLAY-1526

When an RC is made (when you merge master) the github action will add a
comment with links to the rc versions on npm and ruby gems

just like we do for alphas

The curl syntax for adding a comment works 


![screenshot-github_com-2024_09_23-15_31_35](https://github.com/user-attachments/assets/a94ba101-b309-4038-888c-2bbf08944b1d)
  • Loading branch information
markdoeswork authored Sep 24, 2024
1 parent 5c8575d commit 4c81bec
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/github-actions-release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,17 @@ jobs:
gh release create v${{ env.new_npm_version }} \
--title "Release Candidate v${{ env.new_npm_version }}" \
--notes "This is a release candidate version. Please test thoroughly before promoting to a stable release." \
--prerelease
--prerelease
- name: Leave PR comment
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUBY_GEM_VERSION: ${{ env.new_ruby_version }}
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"

0 comments on commit 4c81bec

Please sign in to comment.