Add Token Validation Step to Cherry-Pick Workflow #84
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 new step to the cherry-pick workflow to validate the bot's GitHub token before attempting to perform the cherry-pick operation. This step uses the
octokit/request-action
GitHub Action to send a GET request to the/user
endpoint of the GitHub API. If the token is valid, the request will succeed and the workflow will continue to the next step. If the token is invalid, the request will fail and the workflow will stop, providing an informative error message.Summary of Changes
.github/workflows/bot-cherry-pick.yml
to include a new step for token validation.octokit/request-action
GitHub Action and theBOT_GITHUB_TOKEN
secret as an input.This change will help identify any issues with the bot's token early in the workflow run and provide a more informative error message if the token is invalid.