-
Notifications
You must be signed in to change notification settings - Fork 150
fix(ado): Manually pass token through http header for ado server #543
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
Conversation
WalkthroughAdds required Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant RM as RepoManager
participant U as utils.getAuthCredentialsForRepo
participant G as git (clone/fetch)
RM->>U: request credentials for repo (ADO)
alt deploymentType == "server"
U-->>RM: { hostUrl, token, authHeader }
RM->>G: cloneRepository(path, cloneUrl, onProgress, authHeader)
Note right of G: uses -c http.extraHeader / git config<br/>to set Authorization header
RM->>G: fetchRepository(path, onProgress, authHeader)
else deploymentType == "cloud"
U-->>RM: { hostUrl, token, cloneUrlWithToken }
RM->>G: cloneRepository(path, cloneUrlWithToken, onProgress)
RM->>G: fetchRepository(path, onProgress)
end
G-->>RM: progress / result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This comment has been minimized.
This comment has been minimized.
@coderabbitai review |
✅ Actions performedReview triggered.
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (17)
CHANGELOG.md
(1 hunks)docs/docs/connections/ado-cloud.mdx
(6 hunks)docs/docs/connections/ado-server.mdx
(7 hunks)docs/snippets/schemas/v3/azuredevops.schema.mdx
(1 hunks)docs/snippets/schemas/v3/connection.schema.mdx
(1 hunks)docs/snippets/schemas/v3/index.schema.mdx
(1 hunks)packages/backend/src/git.ts
(4 hunks)packages/backend/src/repoManager.ts
(3 hunks)packages/backend/src/types.ts
(1 hunks)packages/backend/src/utils.ts
(2 hunks)packages/schemas/src/v3/azuredevops.schema.ts
(1 hunks)packages/schemas/src/v3/azuredevops.type.ts
(1 hunks)packages/schemas/src/v3/connection.schema.ts
(1 hunks)packages/schemas/src/v3/connection.type.ts
(1 hunks)packages/schemas/src/v3/index.schema.ts
(1 hunks)packages/schemas/src/v3/index.type.ts
(1 hunks)schemas/v3/azuredevops.json
(1 hunks)
🔇 Additional comments (1)
packages/backend/src/utils.ts (1)
197-220
: Thanks for isolating the ADO server flow.This keeps the cloud and server paths straight while giving us the header we need for the Basic-auth fallback. 👌
@coderabbitai review |
✅ Actions performedReview triggered.
|
Thank you @Shaoqi-Cen for proposing the solution for this and providing extremely useful context in #533
This PR implements the same underlying logic but with the proposed structure. Putting up this PR so we can get this fix merged asap
This PR also makes the
deploymentType
field in the ADO config mandatory. This makes it much easier to tell with auth strategy to use. This will technically break deployments which don't pass this field in, but the error logs are very clear here and the behavior of the deployment won't change after the deploymentType is set, so I don't think it's worth pushing a major versionSummary by CodeRabbit