Add BOT_GITHUB_TOKEN validation to help-comment-issue workflow #106
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Feedback (click)
I created this PR to fix the failing GitHub Actions.## Description
This PR adds a validation step to the
help-comment-issue.yml
workflow to check if theBOT_GITHUB_TOKEN
secret is set and valid. This is done to prevent the workflow from failing due to bad credentials.The validation is done by trying to fetch the repository's details using the
octokit.rest.repos.get
method with theBOT_GITHUB_TOKEN
as the authentication token. If the fetch operation fails, the workflow fails with an error message indicating that theBOT_GITHUB_TOKEN
secret is not set or invalid.Summary of Changes
help-comment-issue.yml
workflow to validate theBOT_GITHUB_TOKEN
secret.actions/github-script@v3
action to run a script that checks the validity of the token.