Skip to content

ci: generate CREDITS with gocredits v1.0.0 from a make target - #553

Merged
k1LoW merged 2 commits into
mainfrom
ci/credits-from-make-target
Sep 28, 2026
Merged

k1LoW merged 2 commits into
mainfrom
ci/credits-from-make-target

Conversation

@k1LoW

@k1LoW k1LoW commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Problem

prerelease_for_tagpr installed gocredits at @latest through depsdev, which resolved to v0.4.0 in the tagpr runs. v0.4.0 reads the module list from go.sum, so it also tries to credit modules that only the tests of dependencies need. It found no license for one of them and the command failed (run 34211030336).

could not find the license for "github.com/davecgh/go-spew"
make: *** [Makefile:39: prerelease_for_tagpr] Error 1

tagpr updated the release pull request anyway and the job stayed green, so CREDITS was never regenerated.

Change

A credits target now installs gocredits pinned to v1.0.0 and prerelease_for_tagpr calls it. v1.0.0 collects modules with go list over every platform instead of reading go.sum, so the go mod download step and the depsdev dependency go away. This follows k1LoW/octocov@c919651. depsdev stays as an empty target because ci still depends on it.

With v1.0.0 the next release pull request will drop 27 test-only modules from CREDITS (chromedp, testify, go-spew, gonum and so on) and add go.yaml.in/yaml/v3, which the build does use.

-skip-missing is not used because every module has a license gocredits can read. A new dependency without one will make make credits fail instead of being left out of CREDITS without a word.

CI also needed a fix unrelated to CREDITS. Homebrew/actions no longer has a master branch, so setup-homebrew@master failed the Test job before it started, on the dependabot pull requests as well. It now points at main.

prerelease_for_tagpr installed gocredits through depsdev at @latest,
which resolved to v0.4.0 in the tagpr runs. v0.4.0 reads the module list
from go.sum, so it also tried to credit github.com/davecgh/go-spew, a
module only the tests of dependencies need, found no license for it and
failed the command. tagpr still updated the release pull request, so the
job stayed green while CREDITS was never regenerated.

The credits target installs gocredits pinned to v1.0.0, which collects
the modules with go list over every platform, and prerelease_for_tagpr
calls it. go list downloads what it reads, so the go mod download step
goes, and prerelease_for_tagpr no longer needs depsdev. depsdev is left
as an empty target because ci still depends on it.
Homebrew/actions no longer has a master branch, only main, so the Test
job fails in Set up job with "unable to find version `master`" before
running anything, on this branch and on the dependabot pull requests
alike.
@github-actions

Copy link
Copy Markdown
Contributor

Code Metrics Report

main (61880c7) #553 (1faf912) +/-
Coverage 34.8% 34.8% 0.0%
Code to Test Ratio 1:0.9 1:0.9 0.0
Test Execution Time 10s 11s +1s
Details
  |                     | main (61880c7) | #553 (1faf912) | +/-  |
  |---------------------|----------------|----------------|------|
  | Coverage            |          34.8% |          34.8% | 0.0% |
  |   Files             |             32 |             32 |    0 |
  |   Lines             |           3467 |           3467 |    0 |
  |   Covered           |           1207 |           1207 |    0 |
  | Code to Test Ratio  |          1:0.9 |          1:0.9 |  0.0 |
  |   Code              |           7118 |           7118 |    0 |
  |   Test              |           6969 |           6969 |    0 |
- | Test Execution Time |            10s |            11s |  +1s |

Reported by octocov

@k1LoW
k1LoW marked this pull request as ready for review September 28, 2026 07:13
@k1LoW
k1LoW merged commit 138e3d1 into main Sep 28, 2026
1 check passed
@k1LoW
k1LoW deleted the ci/credits-from-make-target branch September 28, 2026 07:14
@github-actions github-actions Bot mentioned this pull request Sep 8, 2026
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

⌂ 换网址