Skip to content

feat(cli): change default OAuth scopes to email and profile#29

Merged
appleboy merged 1 commit intomainfrom
worktree-scope
Apr 2, 2026
Merged

feat(cli): change default OAuth scopes to email and profile#29
appleboy merged 1 commit intomainfrom
worktree-scope

Conversation

@appleboy
Copy link
Copy Markdown
Member

@appleboy appleboy commented Apr 2, 2026

Summary

  • Change default OAuth scopes from read write to email profile to align with standard OIDC scopes
  • Update flag help text, config default, and test fixtures

Test plan

  • make test passes
  • make lint passes

- Update default scope from "read write" to "email profile" to align with OIDC standard scopes
- Update test fixtures to match new default scope
Copilot AI review requested due to automatic review settings April 2, 2026 06:43
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
config.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@appleboy appleboy merged commit f358ea1 into main Apr 2, 2026
17 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the CLI’s default OAuth scopes to better match common OIDC usage by switching from application-style scopes to identity/profile scopes.

Changes:

  • Change the default scope value from read write to email profile in configuration loading.
  • Update --scope flag help text to reflect the new default.
  • Update test fixtures in main_test.go to use the new default.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
config.go Updates the --scope help text and the resolved default SCOPE value to email profile.
main_test.go Updates test configs to use the new default scope string.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 120 to +122
IntVar(&flagCallbackPort, "port", 0, "Local callback port for browser flow (default: 8888 or CALLBACK_PORT env)")
cmd.PersistentFlags().
StringVar(&flagScope, "scope", "", "Space-separated OAuth scopes (default: \"read write\")")
StringVar(&flagScope, "scope", "", "Space-separated OAuth scopes (default: \"email profile\")")
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The README still documents the default SCOPE env var value as read write (README.md:260). Since this flag help text now states the default is email profile, please update the README (and any other user-facing docs) to keep the documented defaults consistent.

Copilot uses AI. Check for mistakes.
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.

3 participants