Repository navigation
Commit e07ced8
fix(git): read a remote url that carries a username
A clone made with a token or a credential helper carries userinfo in its
remote - https://user@github.com/owner/repo.git, or user:token@ when the
credential is baked in, which is what the GitHub Actions default looks
like. V1 handled that form; the V2 rewrite folded V1's two patterns into
one and dropped the optional userinfo group with it.
The cost was not a missing feature but a misleading one: detection
returned undefined and create reported "No GitHub repository was found in
<dir>", telling the user to run from a GitHub working copy while they were
standing in one. Neither suggested remedy helps, since --data-dir points at
the same config.
Splitting the http(s) and ssh branches apart pays for itself twice. Only
the scp-style form takes a ":" after the host, so restoring "/" as the
separator everywhere else closes a host-confusion shape the single pattern
had let through: a second userinfo segment parsed as the namespace on a
host that is not GitHub. Constraining the two captures to the characters
GitHub allows in a name closes the scp-style variant of the same trick.
Both negative cases build their url from randomUUID() rather than a
literal, so the fixture does not read as a credential to the push scan.
The file was exempted from talisman by whole-file checksum, which this
edit invalidates. Two lines in the config parser read as a secret to it -
the entry it pushes with a key and a value beside each other, and
valueOf's signature, which takes a key and returns a string. Allowing
those two shapes instead of re-checksumming keeps the rest of the file
scanned and survives the next edit to it.
#claude_code#
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent cc985e9 commit e07ced8
3 files changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
| |||
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
107 | 123 | | |
108 | 124 | | |
109 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
0 commit comments