Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, here are potentially related PRs:
These PRs may share similar concerns around GitLab workflow setup and OAuth handling, though PR #50844 specifically focuses on self-managed instance support with expired credential handling. |
79fc541 to
1f782e5
Compare
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Hi @rekram1-node hope you are doing well, can you help me reviewing this PR |
|
Looking. |
|
Oh if this is for v2, then you aren't targeting the correct branch. |
|
No, for v1 |
Issue for this PR
Closes #50843
Type of change
What does this PR do?
Fixes GitLab Duo workflows on self-managed GitLab instances.
The GitLab provider now uses the configured instance URL when refreshing OAuth credentials and passes the current working directory to Duo workflow models, allowing
gitlab-ai-providerto automatically detect the GitLab project context from the repository remote.It also handles expired or invalid OAuth credentials gracefully. If the OAuth refresh fails, GitLab is disabled for the current session instead of preventing OpenCode from starting.
Additionally, if an OAuth refresh succeeds but the refreshed credentials cannot be persisted, GitLab is disabled for the current session instead of allowing the persistence error to terminate the provider initialization.
How did you verify your code works?
Tested locally on Windows with a self-managed GitLab instance.
bun run typecheckpasses forpackages/opencode.bun test test/provider/provider.test.tspasses with 102 tests and 0 failures.400 invalid_grantwhen OpenCode attempted to refresh the expired OAuth token.GitLab OAuth refresh failed; disabling GitLab provider for this sessionand continued initializing normally instead of failing startup.gitlab-ai-providercan detect the GitLab project context from the repository remote.@solidjs/startwas unavailable in the local dependency tree and the package download frompkg.pr.newreturned HTTP 403. Thepackages/opencodetypecheck and provider test suite passed independently.Screenshots / recordings
N/A - no UI changes.
Checklist