Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rc comment with package links #3720

Merged
merged 17 commits into from
Sep 24, 2024
14 changes: 9 additions & 5 deletions .github/workflows/github-actions-release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,19 @@ 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 }}
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"
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}})"
})
Loading