Skip to content

sticky comment#24

Open
CodeYogiCo wants to merge 5 commits into
target:masterfrom
CodeYogiCo:master
Open

sticky comment#24
CodeYogiCo wants to merge 5 commits into
target:masterfrom
CodeYogiCo:master

Conversation

@CodeYogiCo

@CodeYogiCo CodeYogiCo commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

❤ THANKS FOR YOUR PULL REQUEST

Proposed change

Describe your change and communicate why we should accept the pull request. Links to issues are helpful too, if applicable.

Types of changes

What types of changes is this pull request introducing to this plugin? Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

You can fill this out after creating your PR. Put an x in the boxes that apply

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Vishal Vaibhav and others added 5 commits June 19, 2026 11:46
Committer: codeyogico<iveeshal@hotmail.com>
Drop the Vela start.sh entrypoint and run the plugin binary directly
(ENTRYPOINT ["/plugin"]); the diff is now produced in-plugin
(PARAMETER_DIFF_SOURCE=github) or piped on stdin. Also run the coverage
job on fork PRs, tolerating the read-only-token comment 403 via
continue-on-error.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add two reporting features that share the report markdown:

- Sticky PR comment: github_pr.go now lists the PR's comments and PATCHes
  the one carrying a hidden marker instead of POSTing a new comment on
  every push. Adds Unmarshal to the json client.
- Job summary: a StepSummary reporter writes the report to
  $GITHUB_STEP_SUMMARY when set, so coverage shows on the Actions run page
  even on fork PRs that can't be commented on. Wired into the workflow by
  mounting and passing the summary file.

Extracts the shared buildMarkdownReport used by both the comment and the
summary, and updates README/AGENTS docs and tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@CodeYogiCo

Copy link
Copy Markdown
Contributor Author

What this PR changes

This bundles several improvements to how the plugin obtains the diff and reports coverage.

Diff sourcing

  • Diff logic moved into the plugin. With PARAMETER_DIFF_SOURCE=github the plugin fetches the PR's unified diff directly from the GitHub API (GET /repos/{owner}/{repo}/pulls/{n} with the vnd.github.v3.diff media type) instead of requiring a piped git diff. stdin remains the default, so existing usage is unchanged.
  • Removed the Vela-specific scripts/start.sh entrypoint. The Docker image now runs the binary directly (ENTRYPOINT ["/plugin"]). The stdin path still works by piping a git diff into the container.

Reporting

  • Sticky PR comment. Instead of posting a new comment on every push, the plugin now looks for its previous comment (via a hidden marker) and updates it in place — one always-current coverage comment per PR.
  • Job summary output. A new reporter writes the same Markdown report to $GITHUB_STEP_SUMMARY, so coverage shows on the Actions run page — visible even on fork PRs where the read-only token can't post a comment.

CI

  • The coverage job now also runs on fork PRs (the read-only-token comment failure is tolerated via continue-on-error on forks), so contributors from forks still get coverage in the job summary.

Internals / tests

  • Extracted a shared buildMarkdownReport used by both the PR comment and the job summary.
  • Added Unmarshal to the JSON client (to read the existing-comments list for the sticky behavior).
  • Updated tests (incl. a sticky-update case and a step-summary reporter test), the mock GitHub API, and README/AGENTS docs. go test ./..., gofmt, and golangci-lint are all clean.

@CodeYogiCo CodeYogiCo requested a review from bmuenzenmeyer June 19, 2026 14:24
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