Skip to content

fix: only treat an all-digit workflow input as a workflow ID - #391

Merged
Codex- merged 1 commit into
mainfrom
fix_workflow_id_prefix_parsing
Nov 10, 2026
Merged

Codex- merged 1 commit into
mainfrom
fix_workflow_id_prefix_parsing

Conversation

@Codex-

@Codex- Codex- commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

parseInt accepted a numeric prefix, so a filename such as 01-build.yml was dispatched as workflow ID 1.

Summary by CodeRabbit

  • Bug Fixes
    • Workflow inputs containing filename text or non-decimal numeric notation are now preserved as text instead of being incorrectly converted to numbers. Inputs made up entirely of digits continue to be interpreted numerically, preserving the expected handling of numbered values and filenames such as 01-build.yml and 2024-release.yml.

`parseInt` accepted a numeric prefix, so a filename such as
`01-build.yml` was dispatched as workflow ID 1.
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

Workflow values are converted to numbers only when every character is a digit. Tests cover digit-prefixed filenames and hexadecimal and exponential formats, which remain strings.

Changes: Workflow value parsing

Layer / File(s) Summary
Workflow conversion and regression tests
src/action.ts, src/action.spec.ts
tryGetWorkflowAsNumber converts inputs to numbers only when every character is a digit. Tests verify that digit-prefixed filenames and hexadecimal and exponential notation remain strings.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: Moderate · up to 058cb

The action would continue to interpret digit-prefixed filenames as workflow IDs. Rebuild and commit the bundle before merging.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/action.spec.ts

Oops! Something went wrong! :(

ESLint: 10.14.0

Error: File '@tsconfig/node24/tsconfig.json' not found.
Occurred while linting /src/action.spec.ts:1
Rule: "import-x/namespace"
at resolveExtends (/.eslint-tmp/node_modules/.pnpm/get-tsconfig@4.14.3/node_modules/get-tsconfig/dist/index.cjs:7:7283)
at parseTsconfig (/.eslint-tmp/node_modules/.pnpm/get-tsconfig@4.14.3/node_modules/get-tsconfig/dist/index.cjs:7:8467)
at parseTsconfig (/.eslint-tmp/node_modules/.pnpm/get-tsconfig@4.14.3/node_modules/get-tsconfig/dist/index.cjs:7:13444)
at getTsconfig (/.eslint-tmp/node_modules/.pnpm/get-tsconfig@4.14.3/node_modules/get-tsconfig/dist/index.cjs:7:17072)
at getTsconfigWithContext (/.eslint-tmp/node_modules/.pnpm/eslint-import-context@0.1.9_unrs-resolver@1.13.0/node_modules/eslint-import-context/lib/utils.js:40:61)
at ModuleInfo.fromFacts (file:///.eslint-tmp/node_modules/.pnpm/eslint-plugin-import-x@4.18.0
@typescript-eslint+utils@8.72.1_eslint@10.14.0_jiti@2.7.0_a72dc

... [truncated 295 characters] ...

int-plugin-import-x/lib/core/module-info.js:105:33)
at ModuleInfo.get (file:///.eslint-tmp/node_modules/.pnpm/eslint-plugin-import-x@4.18.0_@typescript-eslint+utils@8.72.1_eslint@10.14.0_jiti@2.7.0_a72dc2702b6cd1aa8ab5ccbe6ed4de73/node_modules/eslint-plugin-import-x/lib/core/module-info.js:41:30)
at processBodyStatement (file:///.eslint-tmp/node_modules/.pnpm/eslint-plugin-import-x@4.18.0_@typescript-eslint+utils@8.72.1_eslint@10.14.0_jiti@2.7.0_a72dc2702b6cd1aa8ab5ccbe6ed4de73/node_modules/eslint-plugin-import-x/lib/rules/namespace.js:11:32)
at Program (file:///.eslint-tmp/node_modules/.pnpm/eslint-plugin-import-x@4.18.0_@typescript-eslint+utils@8.72.1_eslint@10.14.0_jiti@2.7.0_a72dc2702b6cd1aa8ab5ccbe6ed4de73/node_modules/eslint-plugin-import-x/lib/rules/namespace.js:143:21)

src/action.ts

ESLint skipped: the matched ESLint configuration already failed (unknown).

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.

Share

@Codex-
Codex- added this pull request to stack #393 November 10, 2026 00:06
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.70%. Comparing base (6805672) to head (058cbec).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #391      +/-   ##
==========================================
+ Coverage   88.46%   89.70%   +1.24%     
==========================================
  Files           3        3              
  Lines          78       68      -10     
  Branches       21       20       -1     
==========================================
- Hits           69       61       -8     
+ Misses          2        1       -1     
+ Partials        7        6       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Codex-
Codex- merged commit 20c11fb into main Nov 10, 2026
6 checks passed
@Codex-
Codex- deleted the fix_workflow_id_prefix_parsing branch November 10, 2026 00:11
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.

2 participants