You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use explicit input instead of github.ref for Kosli reporting conditions (#727)
* fix: use explicit input instead of github.ref for Kosli reporting conditions
In pull_request_target events, github.ref resolves to the base branch
(e.g. refs/heads/main), not the PR head. This meant Kosli reporting
conditions like `github.ref == 'refs/heads/main'` were true for every
PR targeting main, potentially causing spurious reports.
The fix computes a `report_to_kosli` boolean once in the caller
(main.yml pre-build) based on the actual event and ref, then passes it
as an explicit input to the reusable workflows (init_kosli.yml,
test.yml, docker.yml). This also fixes two operator-precedence bugs in
docker.yml where `||` vs `&&` grouping was wrong.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: default report_to_kosli to false, require explicit opt-in
Callers must now explicitly pass report_to_kosli/report_results: true.
This prevents accidental Kosli reporting if a new caller forgets to set
the input. Updated release.yml to explicitly opt in.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: only report to Kosli on push events to main or tags
Dependabot PRs (pull_request_target) have GITHUB_REF set to the base
branch (refs/heads/main), which caused report_to_kosli to be true.
Now we also require the event to be a push, so only actual pushes to
main or tag releases trigger Kosli reporting.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: skip PR and never-alone attestations on tag releases
These attestations only make sense for main branch pushes, not tag
releases. Added a separate report_pr_attestations input to
init_kosli.yml (default false) that main.yml sets to true only for
pushes to main.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: use single report_to_kosli string with none/all/release values
Replace the two boolean inputs (report_to_kosli + report_pr_attestations)
with a single string input across all reusable workflows:
- "none": no Kosli reporting (default)
- "all": full reporting including PR and never-alone attestations (main)
- "release": reporting without PR/never-alone attestations (tags)
Also renamed test.yml's report_results to report_to_kosli for
consistency across all workflows.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Peter Beckham <peter.beckham@kosli.com>
0 commit comments