Skip to content

fix: expand SHA regex to support SHA-256 (64-char) commit hashes#2413

Draft
yaananth wants to merge 1 commit intoactions:mainfrom
yaananth:sha256/fix-input-helper-regex
Draft

fix: expand SHA regex to support SHA-256 (64-char) commit hashes#2413
yaananth wants to merge 1 commit intoactions:mainfrom
yaananth:sha256/fix-input-helper-regex

Conversation

@yaananth
Copy link
Copy Markdown

Summary

Update input-helper.ts to recognize both 40-char (SHA-1) and 64-char (SHA-256) hex strings as commit SHAs. Rebuild dist/index.js.

Changes

  • src/input-helper.ts: Update regex from /^[0-9a-fA-F]{40}$/ to /^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$/
  • dist/index.js: Rebuilt bundle

Validation

  • Build passes (npm run build)
  • 8 test suites, 96 tests pass (npm test)

Context

  • Parent epic: SHA-256 Support for Git Repositories

Automated by project-board-agents-plugin via /project-board-agents:lead
Board: https://github.com/orgs/github/projects/24272/views/1
Item: [P0] Fix SHA-1 regex in actions/checkout input-helper.ts
Run: sha256-p0-checkout-00050

Update input-helper.ts to recognize both 40-char (SHA-1) and 64-char
(SHA-256) hex strings as commit SHAs. Rebuild dist/index.js.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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