The autobump engine opens pull requests with gh and git push, so its
environment must keep GH_TOKEN. Portage passes that environment into
every ebuild phase, which builds unreviewed upstream releases, so both
autobump workflows add the token variables to ENV_UNSET in make.conf.
ENV_UNSET is incremental and needs EAPI 7, which every overlay ebuild
already uses.
The nvchecker job exports a personal access token right after its pip
install, so an unpinned release of any dependency could read it. The
job now installs exact versions with hashes for the runner's Python
3.12. Regenerate .github/nvchecker-requirements.txt with:
printf '%s\n' nvchecker==2.22 jq==1.13.0 portage==3.0.83 |
uv pip compile - --generate-hashes --python-version 3.12 \
--no-header --no-annotate
A pull request's own run writes findings.json and the elog artifacts,
so a line starting with a backtick run could close the code fence and
post markdown under github-actions[bot]. Backticks in that text now
become quotes. The commit subject in the pull request rules comment is
not fenced at all, so it now goes into a code span with its backticks
and control characters replaced.
emerge-targets.sh turned a new top-level file such as SECURITY.md into
the atom SECURITY.md/, which failed emerge-on-pr, so paths without
category/package/file are skipped.
Signed-off-by: Zakk <zakk@gentoozh.org>
pkgcheck-comment.sh runs from master with a token that can write
comments, but takes the commit, the package names and the findings from
the report that the pull request's own run produced. A finding
description with a newline and six backticks closed the code block it
was quoted in, so a pull request could add any Markdown, link or
mention to the bot comment.
The commit and package names now keep only atom characters, as
emerge-elog-comment.sh does with its artifact fields. Each finding has
its control characters replaced by spaces and is cut to 300
characters, so it stays one line inside its code block.
Signed-off-by: Zakk <zakk@gentoozh.org>
The emerge job failed on any saved elog, so warn elog from eclasses,
such as CONFIG_CHECK without kernel sources in the CI container, failed
pull requests whose package was fine. The job now fails only on QA and
error elog. Portage also saves log elog now, and every target's elog is
uploaded and reported in a new section of the pkgcheck report comment,
so reviewers still see the warnings and post-install notes. When
dependency resolution or the emerge fails, the section shows the last
lines of its output, because the elog alone does not show the cause. The
build.log of each package that failed is uploaded as an artifact and
linked from its row.
pkgcheck-comment now also handles the requested event of pkgcheck and
emerge-on-pr, so each section shows that its run is in progress, and
removes the elog section when a push leaves no emerge targets. Because
runs of both sections and of older pushes edit the same comment at once,
upsert-comment-section.sh writes only while the pull request head is
still the run's commit, and reads the comment back to write again when
another run overwrote its section.
Signed-off-by: Zakk <zakk@gentoozh.org>
Compare findings without the version, so a finding that a bump carries over from the
previous ebuild is no longer reported as new. Group new findings by level and list
the existing ones, because a flat list did not show which findings break the package.
Fail the report check on a new error-level finding. Mark the scan unfinished when
pkgcheck fails, which previously read as a clean report, and scan with --config no,
because the exit keywords in metadata/pkgcheck.conf made a NonexistentDeps finding
look like a failed scan.
Signed-off-by: Zakk <zakk@gentoozh.org>
Workflow names now match their file stems, so the Actions list and the
files read the same; generate-deps-relation-r1.yml becomes
deps-table.yml after the branch it maintains. Steps are lowercase and
verb-first, every step is named, and the autobump-rb checkout has one
name everywhere.
Also use 4-space step indentation, fromJSON, bare if: expressions,
github.actor for every ghcr login, uppercase env names, and the
GITHUB_REPOSITORY and GITHUB_REPOSITORY_OWNER variables the runner
already sets instead of REPO and OWNER copies. No behaviour changes.
Signed-off-by: Zakk <zakk@gentoozh.org>
pkgcheck-comment runs master's scripts, but the artifact comes from the
pull request's merge ref, which can predate the change that added the
complete marker. Such an artifact was reported as a scan that did not
finish (#14536). Stage now writes an incomplete marker when the scan did
not finish, so an artifact without either marker reads as before.
Signed-off-by: Zakk <zakk@gentoozh.org>
A failed `pmaint sync` or `pmaint regen` left empty report files, and the
comment counted zero new findings and posted good. The scan now leaves a
complete marker and the comment reports a scan that did not finish.
New findings were keyed by package, keyword and version, so a second
finding of the same keyword in an existing version was taken for the old
one. They are now compared by their message without line numbers, counted
as a multiset.
The marker lookup only takes comments written by a bot, so a user comment
that quotes the marker is not edited.
Signed-off-by: Zakk <zakk@gentoozh.org>
Because the engine returns to master, restore the dispatched ref so
every trial target uses the selected scripts. Reuse the worker image
because it already supplies the trial setup and tools.
A skipped report job leaves no artifact, so skip its download and comment
instead of failing the comment workflow. Select a marker across all
comment pages because per-page lookup can return several comment IDs.
Signed-off-by: Zakk <zakk@gentoozh.org>