Add public artifact dash hook#68
Conversation
2295ab8 to
45e1141
Compare
45e1141 to
2336b0c
Compare
118392d to
0fc3952
Compare
2336b0c to
c762bea
Compare
0fc3952 to
e90232f
Compare
c762bea to
a46abe2
Compare
e90232f to
fa60fe9
Compare
a46abe2 to
3819b51
Compare
fa60fe9 to
0e434b4
Compare
3819b51 to
87e9035
Compare
0e434b4 to
c8900d7
Compare
87e9035 to
f060ee2
Compare
c8900d7 to
955c719
Compare
f060ee2 to
02575b7
Compare
955c719 to
fc969f6
Compare
02575b7 to
f48d5ad
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f48d5ad368
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| DASH_CHARS = chr(0x2013) + chr(0x2014) | ||
| SHELL_ARG = r'"[^"]+"|\'[^\']+\'|\S+' | ||
| PUBLIC_COMMAND_RE = re.compile( | ||
| rf"\b(git(?:\s+(?:(?:-C|--git-dir|--work-tree|--namespace)\s+(?:{SHELL_ARG})|-c\s+(?:[^\s=]+=(?:{SHELL_ARG})|(?:{SHELL_ARG}))|--[A-Za-z0-9-]+=(?:{SHELL_ARG})|--[A-Za-z0-9-]+|-[A-Za-z]+))*\s+(?:commit|tag)|gh(?:\s+(?:(?:--repo|-R)\s+(?:{SHELL_ARG})|--repo=(?:{SHELL_ARG})))*\s+pr\s+\S+|gh\s+release)\b", |
There was a problem hiding this comment.
Match gh release invocations with repo flags
When a release command targets another repo with -R or --repo before the subcommand, this regex falls through to the bare gh\s+release alternative, so gh --repo owner/repo release create ... --title <text containing U+2014> is allowed. The GitHub CLI manual for gh release create lists inherited -R, --repo <[HOST/]OWNER/REPO> to select another repository (https://cli.github.com/manual/gh_release_create), and the PR branch just above already handles those repo flags, so this leaves a common release-publishing path outside the new guard.
Useful? React with 👍 / 👎.
Keeps public git and GitHub text from carrying Unicode dash characters before the portable hook set grows further.