Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add test for JavaScript frontmatter hash algorithm
Add GitHub API integration tests for JavaScript frontmatter hash algorithm
Feb 2, 2026
Contributor
|
@copilot run at least one test with live data, no locks |
- Add test that uses real GitHub API (getOctokit) to fetch workflows - Test skips gracefully when GITHUB_TOKEN/GH_TOKEN not available - Add standalone test script (test-live-github-api.cjs) for manual testing - Add TESTING_LIVE_API.md documentation with usage instructions - Fetches real workflow with imports from githubnext/gh-aw - Verifies hash computation is deterministic with live API calls Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Added live GitHub API test in commit b4da6e8. The test uses To run: GITHUB_TOKEN=ghp_xxx npm test -- frontmatter_hash_github_api.test.cjsAlso added:
|
Copilot
AI
changed the title
Add GitHub API integration tests for JavaScript frontmatter hash algorithm
Add GitHub API integration tests for JavaScript frontmatter hash algorithm (including live API tests)
Feb 2, 2026
Contributor
|
@copilot run the test in a dedicated job in ci.yml as an integration test. Skip if GitHub token env var is not set. |
- Add js-integration-live-api job to ci.yml - Runs frontmatter_hash_github_api.test.cjs with real GitHub API - Gracefully handles missing GITHUB_TOKEN (skips live test) - Provides clear summary output in GitHub Actions - Runs after validate-yaml job for faster feedback - Uses same Node.js setup as main js job Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Added dedicated CI job in commit ec0316f. The
The test will run automatically on all PRs and pushes to main. |
Copilot
AI
changed the title
Add GitHub API integration tests for JavaScript frontmatter hash algorithm (including live API tests)
Add GitHub API integration tests for JavaScript frontmatter hash algorithm with CI integration
Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Validates JavaScript and Go frontmatter hash implementations produce identical outputs when fetching workflows via GitHub's repos.getContent API. Includes tests with both mocked and live GitHub API calls, plus automated CI integration.
Changes
actions/setup/js/frontmatter_hash_github_api.test.cjswith 10 testscreateGitHubFileReaderwrapper for GitHub APIaudit-workflows.md(with imports),archie.md(without imports)test-live-github-api.cjsfor manual testing with detailed outputTESTING_LIVE_API.mdwith instructions for running live API testsjs-integration-live-apijob in.github/workflows/ci.ymlthat runs the live API test automaticallyExample
Test Coverage
CI Integration
The live API test runs automatically in CI via the
js-integration-live-apijob:secrets.GITHUB_TOKENto fetch real workflow dataRunning Live API Tests
See
actions/setup/js/TESTING_LIVE_API.mdfor complete documentation on running tests with live GitHub API data.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.