-
-
Notifications
You must be signed in to change notification settings - Fork 40
fix: encode username in URL
#223
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
🦋 Changeset detectedLatest commit: 9d0528e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
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.
Important
Looks good to me! 👍
Reviewed everything up to 5d189a5 in 57 seconds. Click for details.
- Reviewed
32lines of code in2files - Skipped
0files when reviewing. - Skipped posting
3draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .changeset/long-stars-tie.md:5
- Draft comment:
Consider adding a more descriptive changeset message for clarity on what was fixed. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. src/main.ts:38
- Draft comment:
Using encodeURIComponent for the username is appropriate to handle special characters. Optionally, review if any other credential parts (e.g., GITLAB_TOKEN) might also require encoding. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. .changeset/long-stars-tie.md:5
- Draft comment:
Typographical suggestion: The commit message on this line is written as "fix encode username". To maintain consistency with conventional commit formatting (as seen in the PR title), consider adding a colon after "fix" (i.e., "fix: encode username"). - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% This is a changeset file, not a commit message. While conventional commit format is common, there's no strong evidence that this project requires or uses that format for changeset descriptions. The suggestion is more about style than substance, and doesn't affect functionality. The project might have specific formatting requirements for changesets that I'm not aware of. The consistency with PR title format could be important for automated tools. Without clear evidence of required changeset formatting conventions in this project, this appears to be a purely stylistic suggestion that doesn't warrant a comment. Delete this comment as it's making a style suggestion without clear evidence that this format is required or important.
Workflow ID: wflow_nzfXu3eZfzgHjnMQ
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
5d189a5 to
54c7dd1
Compare
WalkthroughA changeset file was added to document a patch update addressing a fix for encoding the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Poem
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
54c7dd1 to
9d0528e
Compare
|
commit: |
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: 2
🧹 Nitpick comments (1)
src/main.ts (1)
45-47: Optional: build the URL via WHATWG URL API for correctness and readabilityLeverage URL.username/password for automatic encoding and simpler construction.
You can refactor this block as:
const remote = new URL(env.GITLAB_HOST) remote.username = username // auto-encodes remote.password = GITLAB_TOKEN // auto-encodes remote.pathname = `${remote.pathname.replace(/\/$/, '')}/${env.CI_PROJECT_PATH.split('/').map(encodeURIComponent).join('/')}.git` await exec('git', ['remote', 'set-url', 'origin', remote.toString()], { silent: !TRUTHY_VALUES.has(env.DEBUG_GITLAB_CREDENTIAL!), })This avoids manual string concatenation and double-encoding risks.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.changeset/long-stars-tie.md(1 hunks)src/main.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-04-01T09:12:22.109Z
Learnt from: JounQin
PR: un-ts/changesets-gitlab#0
File: :0-0
Timestamp: 2025-04-01T09:12:22.109Z
Learning: For the un-ts/changesets-gitlab repository, always run `yarn build` before running `yarn lint` as the build process generates files required by the linting process.
Applied to files:
src/main.ts
🧬 Code Graph Analysis (1)
src/main.ts (1)
src/env.ts (1)
GITLAB_TOKEN(24-32)
🔇 Additional comments (2)
.changeset/long-stars-tie.md (1)
1-6: Changeset looks goodClear, scoped patch note matching the code change intent.
src/main.ts (1)
45-45: Good fix: username is now encodedUsing encodeURIComponent for the username in the remote URL is correct and addresses special characters.



Important
Encode username in
main.tswhen setting GitLab credentials to handle special characters.encodeURIComponentinmain()inmain.tswhen setting GitLab credentials.long-stars-tie.mdto document the patch fix.This description was created by
for 5d189a5. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit