-
Notifications
You must be signed in to change notification settings - Fork 43
Replace gh aw CLI execution with JavaScript hash computation in workflow validation #13168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@copilot parse the frontmatter hash from the lock file using a JavaScript regex |
Co-authored-by: pelikhan <[email protected]>
|
@copilot reference is ok, it seems that the script tried to execute gh aw in a step which is wrong. Investigate step output and fix |
Co-authored-by: pelikhan <[email protected]>
Done. Replaced the
Fixed. The issue was in |
|
@copilot only do frontmatter sha computation of timestamp check failed. |
Co-authored-by: pelikhan <[email protected]>
The workflow timestamp check script was executing
gh aw hash-frontmattercommand to compute frontmatter hashes, which is not available in GitHub Actions runtime environments and caused workflow failures.Changes
Replaced CLI execution with JavaScript implementation in
check_workflow_timestamp_api.cjs:computeFrontmatterHashViaGo()function that executedgh aw hash-frontmattercomputeFrontmatterHash()fromfrontmatter_hash_pure.cjswith GitHub API file readercreateGitHubFileReader()to fetch workflow files via GitHub API instead of requiring local filesystem accessworkflowDate > lockDate, avoiding unnecessary GitHub API calls when workflows are up to dateBefore:
After:
The new implementation uses pure JavaScript regex parsing to extract frontmatter hashes from lock files and compute hashes from workflow markdown files, eliminating the dependency on the
gh awCLI in GitHub Actions. Hash computation is now conditional and only runs when needed for debugging outdated lock files.Testing
check_workflow_timestamp_api.test.cjspassOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.