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
Detect Github access token when it is not OAuth token in cli.py #7102
Detect Github access token when it is not OAuth token in cli.py #7102
Conversation
Preparing PR description... |
β Deploy Preview for auto-gpt-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
PR Review(Review updated until commit a48560f)
β¨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. Preparing PR description... |
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. Persistent review updated to latest commit 72b8582 |
72b8582
to
c84407c
Compare
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. Preparing PR description... |
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. Persistent review updated to latest commit c84407c |
c84407c
to
a48560f
Compare
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. Preparing PR description... |
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. Persistent review updated to latest commit a48560f |
cli.py
Outdated
install_error = True | ||
click.echo( | ||
click.style( | ||
"β Response is lack of X-OAuth-Scopes, please make sure you use OAuth token.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lacking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I have fixed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comparing "is lacking in something" & "lack something"
I wonder maybe just "lack something" is clear enough
c00e91e
to
0468dfe
Compare
@ntindle Sorry to bother you |
Many thanks to ntindle. |
Good spot, this was actually supposed to be removed as a feature from the CLI so glad you caught it! |
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
Closing as we are removing this functionality |
Background
Ref Issue: #7095
If user set a Github Fine-grained token,
TypeError
will be raisedAnd also because Fine grained token currently can not list permission, Github team is still working on it ..., we can not distinguish perms of Fine grained token and let setting procedure done.
In addition to above facts, I think we can consider to remind user this token should be an OAuth token when it's not, or user might confuse when they set a token but it turns out TypeError.
Changes ποΈ
In the setup process, if
X-OAuth-Scopes
is not exist in Github response, remind user to set an OAuth token.Ref
Response header I get when using Github Fine-grained token
PR Quality Scorecard β¨
+2 pts
+5 pts
+5 pts
+5 pts
-4 pts
+4 pts
+5 pts
-5 pts
agbenchmark
to verify that these changes do not regress performance? β+10 pts