feat: move-diff-logic-within-the-plugin#5
Merged
Conversation
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>
🛡️ Patch Coverage Report
Diff coverage:
Lines = the source lines you changed. Instructions = the executable units the coverage tool counts inside those lines — one line can hold several (e.g. JaCoCo bytecode), so the two counts differ. Coverage by file
7 changed file(s) with no measurable lines (config, docs, generated, or test-only) omitted. 🔍 Uncovered lines (5)🤖 Generated by pull-request-code-coverage — coverage for changed lines only. |
CodeYogiCo
pushed a commit
that referenced
this pull request
Jun 24, 2026
PR #5 removed scripts/start.sh which used to run `git fetch` + `git diff` and pipe the result into the plugin. Callers that relied on that behaviour (e.g. Vela pipelines that never set PARAMETER_DIFF_SOURCE) now get empty stdin and see "0 of 0 changed instructions covered". Add PARAMETER_DIFF_SOURCE=git that runs the same git commands internally, using PARAMETER_BASE_BRANCH (or VELA_PULL_REQUEST_TARGET for backward compatibility) as the base ref. Auto-detect: when PARAMETER_DIFF_SOURCE is absent but VELA_PULL_REQUEST_TARGET is set the runner silently defaults to "git", so existing Vela pipelines recover without any configuration change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CodeYogiCo
added a commit
that referenced
this pull request
Jun 24, 2026
* fix: restore git-diff mode to fix v1.0.1 regression on Vela PR #5 removed scripts/start.sh which used to run `git fetch` + `git diff` and pipe the result into the plugin. Callers that relied on that behaviour (e.g. Vela pipelines that never set PARAMETER_DIFF_SOURCE) now get empty stdin and see "0 of 0 changed instructions covered". Add PARAMETER_DIFF_SOURCE=git that runs the same git commands internally, using PARAMETER_BASE_BRANCH (or VELA_PULL_REQUEST_TARGET for backward compatibility) as the base ref. Auto-detect: when PARAMETER_DIFF_SOURCE is absent but VELA_PULL_REQUEST_TARGET is set the runner silently defaults to "git", so existing Vela pipelines recover without any configuration change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: use require.Error and bogus branch in autodetect test Two bugs in TestDefaultRunner_Run_DiffSourceAutodetect_VelaTarget: - Used assert.Error instead of require.Error: when err is nil the next line calls err.Error() and panics with a nil pointer dereference. - Used "main" as the Vela target branch: in CI the repo has origin/main so git fetch succeeds, err stays nil, and the test fails. Fix both: switch to require.Error (stops the test on nil) and use a branch name that cannot exist on any remote so git fetch always fails. Also fix gofmt whitespace in runner.go. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: suppress gosec G204 on controlled git subprocesses golangci-lint flags exec.Command calls with variable args as G204. The args are built from our own logic (not raw user input), so suppress the warning with nolint comments — same pattern used elsewhere in the repo. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
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.
Drop the Vela
start.shentrypoint and run the plugin binary directly (ENTRYPOINT ["/plugin"]). The diff is now produced in-plugin (PARAMETER_DIFF_SOURCE=github) or piped on stdin, so the Vela git-diff wrapper is no longer needed.scripts/start.sh; Dockerfile now usesENTRYPOINT ["/plugin"].--entrypoint /pluginoverride in the GitHub Actions workflow.continue-on-error.🤖 Generated with Claude Code