Commit Graph
11 Commits
Author SHA1 Message Date
Zakk 06cf3c541b .github: report emerge elog in the pull request comment
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>
2026-10-22 09:34:26 +11:00
Zakk 3e38a423ca .github: comment on a rule-breaking pull request instead of closing it
The required_checks ruleset already blocks the merge for everyone: pr-rules
is a required check and the ruleset has no bypass actors. Closing on top of
that only forced a new pull request for a fixable description. Keep one
comment that names the problems, update it on each run, and delete it once
the rules pass. pr-rules now also triggers the comment job, so editing the
description clears it without a push.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-17 19:58:03 +11:00
Zakk d09a49ff02 .github: check commit rules and the PR template in pr-rules
Contributors delete the template, so reviewers cannot see whether
pkgcheck ran or AI was used. The boxes stay optional because not every
contributor can run pkgcheck with --net and the AI box applies only when
AI was used. The autobump bot does not fill in the template and is
skipped.

The commit rules move from pkgcheck into the same workflow, because both
checks read the pull request rather than the ebuilds and must rerun when
the description is edited, which pkgcheck should not.

pkgcheck-comment now also closes a pull request without the template,
and its reply lists the commit and template problems in separate
sections.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-11 05:45:11 +11:00
Zakk 3b3edd4462 .github: use one naming and formatting style across workflows
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>
2026-10-11 04:30:43 +11:00
Zakk b598d725b8 .github: check the commit rules as a pull request job
pkgcheck-comment closes a pull request only after pkgcheck has finished,
and its check is not attached to the pull request, so a maintainer could
merge before it ran. A commits job in pkgcheck fails on the same rules
and can be required before merging. Both read the rules from
scripts/commit-rules.sh.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-11 04:01:09 +11:00
Zakk 937d70afff .github: explain the commit rules when closing a pull request
The reply listed what a commit missed but left the rules vague and gave
no example, so a contributor could not tell how to fix the commits. It
now lists the rules with examples and the commands that fix them.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-11 04:01:09 +11:00
Zakk f48ddbfecd .github: close pull requests whose commits break pr-text.md
pr-text.md asks every subject to start with what it changes, every
commit to carry Signed-off-by, and a branch rebased without merge
commits. Nothing checked it, so subjects such as "bump version" and
"Update <path>.ebuild" reached master.

pkgcheck-comment already runs with a write token for every pull request
and resolves its number, so it closes one whose commits miss any of
these, replying with each commit, what it misses and how to fix it.
Reverts keep git's default subject.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-11 03:27:38 +11:00
Zakk 5cefccb26c .github/workflows: move trial and pkgcheck comment logic into scripts
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>
2026-10-02 01:54:16 +10:00
dependabot[bot] 0e4c56da0d build(deps): bump actions/download-artifact from 7 to 8
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-01 21:38:51 +10:00
Zakk c953b05c55 .github/workflows: pkgcheck: fix the pull request comment
因为 commits/{sha}/pulls 对来自 fork 的 pull request 返回空,而这里的 pull request
都来自 fork,所以评论一次也没发出去。改成拿 head sha 去匹配开着的 pull request。

因为 workflow_run 对 master 上的 push 也会触发,而那种 run 里 report 任务被跳过、
没有 artifact,所以下载那步失败,每次合并都留一个红的 run。
2026-07-30 10:54:40 +10:00
Zakk ed5071f22d .github/workflows: pkgcheck: comment scan results for changed packages
因为仓库级扫描只在 NonexistentDeps 上失败,所以改动的 ebuild 上 warning 级别的问题
不会让 CI 变红。

因为 pkgcheck 会 source 它扫描的 ebuild,等于执行 PR 里的代码,所以扫描只拿只读
token,评论由 workflow_run 另起一个不检出该代码的任务发出。

因为包里原有的问题会淹没 PR 引入的那几条,所以基线分支也扫一遍,评论只列新增的。
2026-07-29 22:40:59 +10:00