Repository navigation
feat: add reusable GitHub Action with sticky PR summary comment - #163
Merged
Merged
Conversation
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.
Summary
Add a reusable one-line GitHub Action (
action.yml) at the repository root that installscodeint, runscodeint diffagainst the pull-request base, posts or updates one sticky pull-request summary comment (scripts/action-comment.mjs), and optionally uploads SARIF to GitHub code scanning.Closes #160
Tier
Tier 2 from the tier check:
action.yml,scripts/action-comment.mjs, andscripts/action-comment.test.mjsmatch no higher tier rule.Task
Spec #160:
action.ymlwithbase-ref,path,version,comment,upload-sarif,fail-on-regression, andtokeninputs.scripts/action-comment.mjsto create or update one sticky pull-request comment identified by a hidden HTML marker, truncating oversized reports cleanly.scripts/action-comment.test.mjs.docs/guide/ci-and-github-actions.md.Fail-first test
scripts/action-comment.test.mjs(buildCommentBodyandfindStickyCommentId)ERR_MODULE_NOT_FOUND).3 passed; 0 failedvianode --test scripts/action-comment.test.mjs).Checks
node --test scripts/action-comment.test.mjscargo run --package xtask -- merged-resultnpx markdownlint-cli2 docs/guide/ci-and-github-actions.mdcargo run --package codeint-cli -- diff origin/mainSafety proof
action.ymlpasses all user inputs and GitHub context values throughenv:variables (never interpolating them into shell commands), pinsgithub/codeql-action/upload-sarifby full commit SHA, and defaultsupload-sariftofalse.node --test scripts/action-comment.test.mjs(3/3 passed),xtask merged-resultpassed, andcodeint diff origin/mainreported 0 new findings.interrogate: none required below Tier 3; CodeQLAnalyze (actions)andAnalyze (javascript-typescript)run in CI.Runtime evidence
0dc9dc0scripts/action-comment.mjssticky-comment formatting, truncation, and marker detection vianode --test scripts/action-comment.test.mjs.Gaps