Skip to content

Add support for GITHUB_TOKEN environment variable - #216

Merged
jerry-skydio merged 1 commit into
mainfrom
arturo/revup/main/env-token-support
Oct 1, 2025
Merged

jerry-skydio merged 1 commit into
mainfrom
arturo/revup/main/env-token-support

Conversation

@arturo-skydio

@arturo-skydio arturo-skydio commented Sep 4, 2025 •

Copy link
Copy Markdown
Contributor

Add support for GITHUB_TOKEN environment variable in authentication
chain, providing compatibility with GitHub CLI and other GitHub tools.
Environment variable is checked after config file but before git
credential helper fallback.

Priority order:

  1. Command line argument (--github-oauth)
  2. Config file (~/.revupconfig)
  3. Environment variable (GITHUB_TOKEN) [NEW]
  4. Git credential helper
  5. Error if none found

Features:

  • Maintains all existing functionality and fallbacks
  • Proper token redaction in logs for security
  • Clear debug messaging showing which method was used
  • Updated error message to mention environment variable option

This change improves user experience by allowing the same environment
variable used by gh and other GitHub tools, reducing setup friction.

Branch: main
Topic: env-token-support

@arturo-skydio

arturo-skydio commented Sep 4, 2025 •

Copy link
Copy Markdown
Contributor Author

Reviews in this chain:
└#216 Add support for GITHUB_TOKEN environment variable

@arturo-skydio

arturo-skydio commented Sep 4, 2025 •

Copy link
Copy Markdown
Contributor Author
# head base diff date summary
0 2d97d1aa 9834d4c1 diff Sep 4 15:42 PM 1 file changed, 16 insertions(+), 8 deletions(-)
1 4d86e7d8 9834d4c1 diff Sep 4 18:31 PM 0 files changed
2 50d601a3 9834d4c1 diff Sep 25 21:09 PM 1 file changed, 3 insertions(+), 3 deletions(-)
3 386fd727 9834d4c1 diff Sep 30 23:48 PM 2 files changed, 10 insertions(+), 1 deletion(-)
4 b6ec92f0 9834d4c1 diff Oct 1 2:38 AM 1 file changed, 9 deletions(-)

Comment thread revup/revup.py Outdated
Comment thread revup/revup.py Outdated

@jerry-skydio jerry-skydio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we settle on supporting only GITHUB_TOKEN? I'd rather not have details from another project enter this codebase, and GITHUB_TOKEN seems more generic

Add support for GITHUB_TOKEN environment variable in authentication
chain, providing compatibility with GitHub CLI and other GitHub tools.
Environment variable is checked after config file but before git
credential helper fallback.

Priority order:
1. Command line argument (--github-oauth)
2. Config file (~/.revupconfig)
3. Environment variable (GITHUB_TOKEN) [NEW]
4. Git credential helper
5. Error if none found

Features:
- Maintains all existing functionality and fallbacks
- Proper token redaction in logs for security
- Clear debug messaging showing which method was used
- Updated error message to mention environment variable option

This change improves user experience by allowing the same environment
variable used by gh and other GitHub tools, reducing setup friction.

Branch: main
Topic: env-token-support
@arturo-skydio arturo-skydio changed the title Add support for GH_TOKEN and GITHUB_TOKEN environment variables Add support for GITHUB_TOKEN environment variable Sep 4, 2025
@arturo-skydio
arturo-skydio force-pushed the arturo/revup/main/env-token-support branch from 2d97d1a to 4d86e7d Compare September 4, 2025 18:31
@arturo-skydio

Copy link
Copy Markdown
Contributor Author

can we settle on supporting only GITHUB_TOKEN? I'd rather not have details from another project enter this codebase, and GITHUB_TOKEN seems more generic

Yup, I'll just change it to accept GITHUB_TOKEN

@arturo-skydio
arturo-skydio force-pushed the arturo/revup/main/env-token-support branch from 4d86e7d to 50d601a Compare September 25, 2025 21:09
Comment thread revup/revup.py Outdated
raise RevupUsageException(
"No Github OAuth token found! "
"Login with 'gh auth login' "
"Set th GITHUB_TOKEN environment variable, "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: spelling

@arturo-skydio
arturo-skydio force-pushed the arturo/revup/main/env-token-support branch from 50d601a to 386fd72 Compare September 30, 2025 23:48
Comment thread .claude/settings.local.json Outdated
@@ -0,0 +1,9 @@
{

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't add this file in this PR. make a dedicated pr if you need this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yea, didn't actually mean to commit this file, removed now

@arturo-skydio
arturo-skydio force-pushed the arturo/revup/main/env-token-support branch from 386fd72 to b6ec92f Compare October 1, 2025 02:38
@jerry-skydio
jerry-skydio merged commit de50e2e into main Oct 1, 2025
5 checks passed
@jerry-skydio
jerry-skydio deleted the arturo/revup/main/env-token-support branch October 1, 2025 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants