YETUS-1280. Support updating or hiding prior GitHub PR comments (#405)

* YETUS-1280. Support updating the GitHub PR comment in place

--github-update-comment[=<key>] implies --github-write-comment, and
updates the comment the token's user previously wrote with the same key
instead of adding a new one on every run. The report is skipped when
the PR head moved past the tested commit.

Assisted-by: Claude Opus 5.5

* YETUS-1280. Support update and hide modes via --github-comment-mode

Replace --github-update-comment with --github-comment-mode=<append|update|hide>
and --github-comment-key=<key>. In hide mode, post a new comment and minimize
prior visible comments written by the same GitHub user with the same key via
GraphQL minimizeComment (classifier: OUTDATED).

Assisted-by: Gemini 4 Neon

* YETUS-1280. Avoid detect-secrets false positive in bats test

Assisted-by: Gemini 4 Neon

* YETUS-1280. Address review feedback on GitHub comment modes

1. Keep public github_write_comment append-only; apply update/hide modes
   only to final reports via github_write_report_comment.
2. Minimize duplicate visible comments after a successful PATCH in update
   mode so transient write failures converge back to one visible report.
3. Have all --github-comment-mode values (including append and fallback)
   enable GITHUB_WRITE_COMMENT, and clarify invalid key warning text.
4. Log warnings on comment-list GET failures and when assuming
   github-actions[bot] after /user lookup fails under GitHub Actions.
5. Tighten bats assertions and add tests for duplicate cleanup,
   non-report writes, missing github-pull.json, and non-GHA bot fallback.

Assisted-by: Gemini 4 Neon
3 files changed
tree: c86020c47ee41ddf9b95eb43bcb24ad4c3ab4aa6
  1. .buildkite/
  2. .circleci/
  3. .github/
  4. .mvn/
  5. .semaphore/
  6. .yetus/
  7. asf-site-src/
  8. audience-annotations-component/
  9. hooks/
  10. precommit/
  11. release/
  12. releasedocmaker/
  13. shelldocs/
  14. yetus-assemblies/
  15. yetus-dist/
  16. yetus-maven-plugin/
  17. .asf.yaml
  18. .codespellignorelines
  19. .codespellignorewords
  20. .codespellrc
  21. .gitattributes
  22. .gitignore
  23. .gitlab-ci.yml
  24. .hadolint.yaml
  25. .jshintignore
  26. .linkcheckerrc
  27. .markdownlint.yaml
  28. .rubocop.yml
  29. .shellcheckrc
  30. .travis.yml
  31. Dockerfile
  32. entrypoint.sh
  33. Jenkinsfile
  34. LICENSE
  35. NOTICE
  36. pom.xml
  37. README.md
  38. start-build-env.sh
  39. website-tester.sh
  40. yetus-dl.sh
README.md

Apache Yetus

Apache Yetus is a collection of libraries and tools that enable contribution and release process for software projects.

Components

Here is a list of the major components:

  • Website source Holds our documentation, which is presented via our website.

  • Precommit Precommit provides robust tools to deal with contributions, including applying patches from a variety of project sources and evaluating them against project norms via a system of plugins. See the precommit overview to get started working with precommit.

  • Audience Annotations Audience Annotations allows projects to use Java Annotations to delineate public and non-public parts of their APIs. It also provides doclets to generate javadocs filtered by the intended audience. Currently builds with Maven 3.2.0+.

  • Shelldocs Shelldocs processes comments on Bash functions for annotations similar to Javadoc. It also includes built-in audience scoping functionality similar to the doclet from Audience Annotations.

  • Release Doc Maker Release Doc Maker analyzes Jira and Git information to produce Markdown formatted release notes.

  • yetus-maven-plugin Builds a maven plugin that provides some small utilities for some uncommon maven requirements (such as symlinks) in addition to being mavenized versions of some of the Apache Yetus functionality.

Building Quickstart

For full instructions on how to build releases and the website, see the guide to contributing for requirements and instructions.

# Launch a Docker container that has all of the project's dependencies
# and a working build environment
./start-build-env.sh

# Build the binary tarball, located in yetus-dist/target/artifacts:
mvn clean install

# Build the binary and source tarballs and sign the content:
mvn clean install -Papache-release

# Same, but if outside the container and need to let the system know
# that the OS uses 'gpg2' instead of 'gpg':
mvn clean install -Papache-release -Pgpg2

# Build the binary and source tarballs, but skip signing them:
mvn clean install -Papache-release -Dgpg.sign=skip

# Build the website (requires a mvn install first)
mvn site site:stage

After executing one or more of the Apache Maven commands, artifacts will be in yetus-dist/target/artifacts or ready for a mvn deploy.

Container Quickstart

The project makes available two convenience container images on https://ghcr.io for both tagged releases and for the main branch. It is highly recommended that casual users use a tagged release so as to not be surprised by incompatible changes that are still rolling through the main branch.

ghcr.io/apache/yetus-base

This image contains all of the tools that Apache Yetus supports. It is intended to be used when the Apache Yetus binaries are running outside of the container to speed up building the actual testing container.

ghcr.io/apache/yetus

This image contains all of ghcr.io/apache/yetus-base plus a built and installed version of Apache Yetus. The binaries are in /usr/bin and therefore part of the default path. This image is ideal for CI systems that take a container image as the operating environment or for interactive use.