Skip to content

Exempt Renovate and Dependabot pull requests from the template check - #194

Merged
MarkusPaulsen merged 1 commit into
mainfrom
ci/exempt-dependency-bots-from-pr-template
Aug 14, 2026
Merged

Exempt Renovate and Dependabot pull requests from the template check#194
MarkusPaulsen merged 1 commit into
mainfrom
ci/exempt-dependency-bots-from-pr-template

Conversation

@MarkusPaulsen

@MarkusPaulsen MarkusPaulsen commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Renovate and Dependabot pull requests are exempted from the pr-template check.
Their bodies are generated by the tool and can never match the repository
template, so every dependency update arrived with a red required check.

Linked issues

None.

1. Problem

The pr-template job checks every pull request body against
.github/PULL_REQUEST_TEMPLATE.md: every ## heading present, no section empty, no unfilled
stub left behind. It is a required status check, so it carries no paths filter.

Renovate and Dependabot write their own body, a dependency table with release notes in one
case and a changelog with a commit list in the other. Neither can be made to emit the Ares
template: Dependabot has no body-template setting, and Renovate's prBodyTemplate composes
fixed blocks that cannot express the numbered sections, the coverage table or the checklists.
So roughly thirty bot pull requests fail a check nobody can fix by editing the body, and a
maintainer either rewrites every bot body by hand or merges past a red check.

The fault is in plugging Ares into CI rather than in Ares: no policy, generated test or
enforcement is involved, so it neither let forbidden code through nor failed a submission.

2. Improvement from the user's perspective

No Improvement.

3. Improvement from the maintainer's perspective

Dependency update pull requests become mergeable without hand-editing their
body, so the required check keeps its meaning: a red pr-template again marks a
human contribution with a malformed body, rather than being routine noise a
maintainer learns to ignore.

The exemption is implemented as a step-level condition rather than an on
filter or a job-level if, which preserves the property the workflow already
documents. A workflow that is filtered away never reports and leaves a required
check pending forever; a job skipped by a job-level condition does satisfy a
required check, but reports as skipped. Keeping one step that runs makes
pr-template report a plain green check for bot pull requests.

4. Testing manual

Prerequisites

  1. Push access to this repository, and the branch
    ci/exempt-dependency-bots-from-pr-template checked out.
  2. actionlint locally, or simply the actionlint workflow run of this pull
    request.

Steps

Not reproducible from an exercise. This changes a GitHub Actions workflow only,
so it is verified from workflow runs rather than from an Ares exercise.

Before the steps, one property of pull_request decides what is observable when.
A pull_request run uses the workflow file from the head branch merged into the
base, so this pull request already runs the new version of the job, while every
other open pull request, including the bot ones, still runs the version on
main. The exempted path therefore cannot be observed anywhere until this is
merged, and steps 4 and 5 are explicitly post-merge.

Steps 1 to 3 are the pre-merge review.

  1. Open the actionlint check of this pull request and confirm it is green,
    which covers the new job-level env block and the four step conditions.
  2. Open the pr-template check of this pull request, expand the job, and read
    the step list. The author is a human, so this is the non-exempt path.
  3. To confirm the guarded check still rejects, edit the body of this pull
    request to delete one ## heading, wait for the edited re-run, then
    restore the heading and confirm the check returns to green.
  4. After merge, open any open Renovate or Dependabot pull request and retrigger
    it by editing its title, or simply wait for the next one. Open its
    pr-template check and expand the job.
  5. After merge, open the pr-template check of the next human pull request and
    confirm the full validation still runs there.

Expected result

  • Step 1: actionlint concludes success with no findings.
  • Step 2: the job reports success. Report the exemption for automated dependency pull requests is marked as skipped, while the checkout, the JDK
    setup and java .github/scripts/CheckPullRequestTemplate.java all execute.
    This is what shows the condition is wired up and evaluates to false for a
    human author.
  • Step 3: the check reports failure, naming the missing heading, and returns to
    success once the heading is restored. This proves the exemption did not
    weaken the check for human authors.
  • Step 4: the job reports success, not skipped, and the log shows only
    Automated dependency pull request, the template check does not apply. with
    the checkout, the JDK setup and the checker step marked as skipped.
  • Step 5: unchanged behaviour, the full validation runs as in step 2.

Negative case (what must still be rejected)

A human pull request with a malformed body must still fail. The condition keys
on github.event.pull_request.user.login matching exactly renovate[bot] or
dependabot[bot], both of which are GitHub App accounts whose login cannot be
chosen by an outside contributor, so it cannot be claimed by a human author or
by a fork. The login is only compared inside an expression and never reaches the
shell, so the existing rule that the untrusted body is passed through the
environment and read with System.getenv is untouched.

Modes exercised

No mode-specific behaviour changed.

  • ArchUnit + AspectJ
  • ArchUnit + instrumentation
  • WALA + AspectJ
  • WALA + instrumentation

5. Test case coverage regarding this PR

No production Java code changed.

Breaking changes and migration

None.

Checklist

  • Documentation (docs/, README.adoc, Javadoc) was updated where the change is user-facing.
  • CI is green, or every remaining failure is explained above.
  • No secrets, tokens or absolute local paths are contained in the diff.

Review progress

  • Code review
  • Manual test

Both bots generate their pull request body themselves, a dependency table
plus release notes, and cannot be taught the repository template, so every
dependency update failed the pr-template check and needed a manual body.

The exemption is a step-level condition on the author login rather than an
`on` filter or a job-level `if`. A workflow that never runs leaves a required
status check pending, and a job skipped by a job-level condition reports as
skipped; keeping one step that runs makes the job report a plain green check.
@MarkusPaulsen
MarkusPaulsen requested a review from a team August 13, 2026 08:20
@MarkusPaulsen
MarkusPaulsen requested review from a team and krusche as code owners August 13, 2026 08:20
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@MarkusPaulsen, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 6 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 800c1ef7-fc87-4642-8243-5ec2a681a477

📥 Commits

Reviewing files that changed from the base of the PR and between e435fad and 2a8918e.

📒 Files selected for processing (2)
  • .github/workflows/pullrequest-template.yml
  • AGENTS.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added docs Automated area label: docs other Automated area label: other labels Aug 13, 2026

@Claudia-Anthropica Claudia-Anthropica left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarkusPaulsen The exact-login exemption skips only the template-validation steps for Renovate and Dependabot while preserving full validation for every other pull request. The directly relevant actionlint and pr-template checks passed at this head, as did the build; no concrete defect was found.

@MarkusPaulsen

Copy link
Copy Markdown
Collaborator Author

The pull request template now bounds each section: 500 characters for Summary, 1000 for
Linked issues, sections 1 to 3 and Breaking changes and migration, 5000 for the testing
manual. The count is what a reader sees, so the template's own instruction comments do not
count towards it.

This description was written before those limits and exceeds 1 of them, so I have
shortened it. Nothing is lost: the original text of every section I touched is kept below,
so you can restore, reword or move any of it yourself.

1. Problem, as it read before (1187 characters, limit 1000)

The pr-template job runs on every pull request against main and validates
the body against .github/PULL_REQUEST_TEMPLATE.md: every ## heading present,
no section empty, no unfilled stub left behind. It is intended as a required
status check, which is why it deliberately carries no paths filter.

Renovate and Dependabot write their own body. Renovate produces a dependency
table plus release notes and a configuration footer, Dependabot produces a
changelog and commit list. Neither can be made to emit the Ares template:
Dependabot has no body-template setting at all, and while Renovate has
prBodyTemplate, it composes fixed building blocks and cannot express the
numbered sections, the coverage table or the checklists this repository
requires. The result is that all of the roughly thirty bot pull requests in the
repository fail a check that no human can fix by editing the body, and a
maintainer either edits every bot body by hand or merges past a red check.

This is a CI defect rather than an enforcement defect: no Ares behaviour, policy
layer or generated security test is involved, so it is neither a false negative
nor a false positive of the security boundary.

@MarkusPaulsen
MarkusPaulsen merged commit 4429150 into main Aug 14, 2026
17 checks passed
@MarkusPaulsen
MarkusPaulsen deleted the ci/exempt-dependency-bots-from-pr-template branch August 14, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Automated area label: docs other Automated area label: other

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants