Skip to content

Add public artifact dash hook#68

Open
ariobarin wants to merge 2 commits into
mainfrom
codex/hook-dash-guard
Open

Add public artifact dash hook#68
ariobarin wants to merge 2 commits into
mainfrom
codex/hook-dash-guard

Conversation

@ariobarin

Copy link
Copy Markdown
Owner

Keeps public git and GitHub text from carrying Unicode dash characters before the portable hook set grows further.

@ariobarin ariobarin mentioned this pull request Jun 30, 2026
Base automatically changed from codex/hooks-infra to main June 30, 2026 15:55
@ariobarin ariobarin force-pushed the codex/hook-dash-guard branch from 2295ab8 to 45e1141 Compare June 30, 2026 16:00
@ariobarin ariobarin changed the base branch from main to codex/modular-doctor-hooks June 30, 2026 18:18
@ariobarin ariobarin force-pushed the codex/hook-dash-guard branch from 45e1141 to 2336b0c Compare June 30, 2026 18:18
@ariobarin ariobarin force-pushed the codex/modular-doctor-hooks branch from 118392d to 0fc3952 Compare June 30, 2026 18:41
@ariobarin ariobarin force-pushed the codex/hook-dash-guard branch from 2336b0c to c762bea Compare June 30, 2026 18:42
@ariobarin ariobarin force-pushed the codex/modular-doctor-hooks branch from 0fc3952 to e90232f Compare June 30, 2026 18:51
@ariobarin ariobarin force-pushed the codex/hook-dash-guard branch from c762bea to a46abe2 Compare June 30, 2026 18:52
@ariobarin ariobarin force-pushed the codex/modular-doctor-hooks branch from e90232f to fa60fe9 Compare June 30, 2026 18:57
@ariobarin ariobarin force-pushed the codex/hook-dash-guard branch from a46abe2 to 3819b51 Compare June 30, 2026 18:58
@ariobarin ariobarin force-pushed the codex/modular-doctor-hooks branch from fa60fe9 to 0e434b4 Compare June 30, 2026 19:12
@ariobarin ariobarin force-pushed the codex/hook-dash-guard branch from 3819b51 to 87e9035 Compare June 30, 2026 19:13
@ariobarin ariobarin force-pushed the codex/modular-doctor-hooks branch from 0e434b4 to c8900d7 Compare June 30, 2026 19:19
@ariobarin ariobarin force-pushed the codex/hook-dash-guard branch from 87e9035 to f060ee2 Compare June 30, 2026 19:20
@ariobarin ariobarin force-pushed the codex/modular-doctor-hooks branch from c8900d7 to 955c719 Compare June 30, 2026 19:28
@ariobarin ariobarin force-pushed the codex/hook-dash-guard branch from f060ee2 to 02575b7 Compare June 30, 2026 19:29
@ariobarin ariobarin force-pushed the codex/modular-doctor-hooks branch from 955c719 to fc969f6 Compare June 30, 2026 19:58
@ariobarin ariobarin force-pushed the codex/hook-dash-guard branch from 02575b7 to f48d5ad Compare June 30, 2026 19:59
Base automatically changed from codex/modular-doctor-hooks to main June 30, 2026 20:06
@ariobarin ariobarin marked this pull request as ready for review June 30, 2026 20:38

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant