Created
July 15, 2022 19:57
-
-
Save danielgomezrico/651ad02e616334aaf0ae0e0fe3abdd17 to your computer and use it in GitHub Desktop.
Github Action - Comment on PR using the PR number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Commenter | |
on: | |
pull_request: | |
types: [opened, reopened] | |
jobs: | |
comment: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v4 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
const { issue: { number: issue_number }, repo: { owner, repo } } = context; | |
let message = "\nsomething-${{github.event.number}} | |
github.issues.createComment({ issue_number, owner, repo, body: message }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment