Skip to content

Rc comment with package links #6

Rc comment with package links

Rc comment with package links #6

name: Comment on Push better
on:
pull_request:
types: [opened, synchronize]
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Leave PR comment
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUBY_GEM_VERSION: '123'
RUBY_GEM_LINK: https://rubygems.org/gems/playbook_ui/versions/${{env.new_ruby_version}}
NPM_VERSION: '456'
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"
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Authorization: token ${PR_NUMBER]}"
})