Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sourcegraph/src-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: sourcegraph/src-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: release/6.12
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 15 commits
  • 32 files changed
  • 6 contributors

Commits on Mar 23, 2026

  1. feat(oauth): use oauth flow to authenticate with predefined src-cli O…

    …Auth client (#1223)
    
    * removed unused func
    
    * add refresh token to device response unmarshall
    
    * make NewClient take ClientID as param
    
    * add oauth flow and use oauth token when SRC_ACCESS_TOKEN is empty
    
    * feat(oauth): Add refresh to oauthdevice.Client (#1227)
    
    * add refresh to oauthdevice.Client
    * oauthdevice: add RefreshToken field and Refresh method
    
    * feat(oauth): Use keyring to store oauth token (#1228)
      * add refresh to oauthdevice.Client
      * add OAuth Transport and use it if no access token
      * secrets: switch to zalando/go-keyring and add context support
      * secrets: scope keyring by endpoint
    
    (cherry picked from commit 0bc535e)
    burmudar committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    bcfd2a2 View commit details
    Browse the repository at this point in the history
  2. oauth: fix oauth token race in http_transport (#1269)

    (cherry picked from commit 8711473)
    burmudar committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    c7f00ad View commit details
    Browse the repository at this point in the history
  3. refactor: login (#1268)

    - split login into distinct flows
    - add specific flow for oauth
    - add specific flows for error conditions
    - update tests
    
    (cherry picked from commit c6de254)
    burmudar committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    df649a6 View commit details
    Browse the repository at this point in the history
  4. refactor: refreshToken -> getToken (#1270)

    - fold getToken and refreshToken into one so that we reduce locking
    
    (cherry picked from commit b5a0552)
    burmudar committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    caf1b3e View commit details
    Browse the repository at this point in the history
  5. feat: dynamically start oauth flow if no SRC_ACCESS_TOKEN (#1271)

    * add AuthMode to config
    
    - AuthModeAccessToken and AuthModeOAuth
    - And check for CI and required AuthModeAccessToken
    
    * decide loginFlow based on config AuthMode
    
    * remove oauth flag
    
    * check for OAuth token precense before starting a new OAuth flow
    
    * remove unused ctx
    
    (cherry picked from commit 4c3f356)
    burmudar committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    de1fb40 View commit details
    Browse the repository at this point in the history
  6. fix/security: prevent command injection on windows (#1272)

    (cherry picked from commit 22191a7)
    evict authored and burmudar committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    841bad0 View commit details
    Browse the repository at this point in the history
  7. feat/auth: add src auth token (#1275)

    * add TokenRefresher and NewTransport
    
    - TokenRefresher centralizes refreshing of OAuth tokens
    - NewTransport creates an OAuth transport while making sure it is
      initialized with a TokenRefresher
    
    * add cmd `src auth token` that prints access token or oauth token
    
    * set refresh window to 5 min
    
    (cherry picked from commit d206288)
    burmudar committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    e0576a7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    12c8bcf View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2026

  1. bug: only require CI=true and AccessToken when making API requests (#…

    …1278)
    
    * check when inCI and whether we required Access Token
    
    * fast fail in APIClient when CI=true and no Access Token
    
    * use apiClient constructor in search_jobs
    
    * fail fast in login / auth token when CI=true and AccessToken not set
    
    * add comment
    
    * review feedback
    
    - rename `RequireAccessToken` to `checkIfCIAccessTokenRequired`
    - provide more context in error on why it happened
    
    * use sentinel error
    
    * use lib errors
    
    (cherry picked from commit 0e5e006)
    burmudar committed Mar 26, 2026
    Configuration menu
    Copy the full SHA
    5175c14 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2026

  1. fix/users: remove query for usageStatistics (#1264)

    This field was deprecated in March last year and was removed November
    last year. Before this change any user subcommand just failed. Will be
    adding some integration smoke tests to catch these sort of issues.
    
    Additionally found one place we didn't set Content-Type which
    Sourcegraph also recently started enforcing.
    keegancsmith authored and burmudar committed Apr 10, 2026
    Configuration menu
    Copy the full SHA
    e3e0140 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    05c8c47 View commit details
    Browse the repository at this point in the history
  3. chore: bump go and deps (#1285)

    andreeleuterio authored and burmudar committed Apr 10, 2026
    Configuration menu
    Copy the full SHA
    84430c9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e2697a7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b791337 View commit details
    Browse the repository at this point in the history
  6. fix/repo-list: print partial data when there are graphql errors (#1282)

    * update GraphQLErrors to have constructor + handle paths
    
    * add test for repo list with some repos failing but not all
    
    * update src repo list to handle graphql errors
    
     - errors are treated as warnings when getting partial data
     - if we have no data and just errors that is a fatal error
    
    * add comment
    
    * Handle partial repo list warnings
    burmudar committed Apr 10, 2026
    Configuration menu
    Copy the full SHA
    bdbe215 View commit details
    Browse the repository at this point in the history
Loading