Next: GitHub API Authentication---Username and Password--Basic, Previous: GitHub API Authentication---Personal Access Tokens, Up: GitHub API Authentication [Index]
In this post, I will explain how to create a GitHub Action workflow that adds a comment to every new pull request using
.github/workflows/pr-comment.yml
.github/actions/pr-comment.js
Both files live in the same repository where the comments will be added.
You will need:
git
and Node.js installed
• Passing the GITHUB_TOKEN secret to a JavaScript file | ||
• Creating a comment using JavaScript | ||
• Secrets and pull requests from forks |