Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Token Validation Step to Cherry-Pick Workflow #84

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Jan 1, 2024

PR Feedback (click)

  • 👍 Sweep Did Well
  • 👎 Sweep Needs Improvement
    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

  • Modified .github/workflows/bot-cherry-pick.yml to include a new step for token validation.
  • The new step uses the octokit/request-action GitHub Action and the BOT_GITHUB_TOKEN secret as an input.
  • If the token is invalid, the workflow will fail with an error message indicating that the token is invalid.

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.

@sweep-ai sweep-ai bot assigned cubxxw Jan 1, 2024
Copy link
Contributor Author

sweep-ai bot commented Jan 1, 2024

Rollback Files For Sweep

  • Rollback changes to .github/workflows/bot-cherry-pick.yml
  • Rollback changes to .github/workflows/bot-cherry-pick.yml

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Jan 1, 2024
Copy link
Contributor Author

sweep-ai bot commented Jan 1, 2024

Sandbox Executions

  • Running GitHub Actions for .github/workflows/bot-cherry-pick.yml
Check .github/workflows/bot-cherry-pick.yml with contents:

Ran GitHub Actions for e066292023f3e7e303239442be3afdccd18a2562:

Copy link
Contributor Author

sweep-ai bot commented Jan 1, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run contributor-assistant/[email protected]
yielded the following error:
##[error]graphql call to get the committers details failed: HttpError: Bad credentials

Here are the logs:
CLA Assistant GitHub Action bot has started the process

Generating plan by analyzing files... (step 2/3)

Copy link
Contributor Author

sweep-ai bot commented Jan 1, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run alex-page/[email protected]
yielded the following error:
##[error]Bad credentials

Here are the logs:


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant