Skip to content

build: Fix release-drafter failing on pull requests#161

Open
astubbs wants to merge 8 commits into
masterfrom
fix/release-drafter
Open

build: Fix release-drafter failing on pull requests#161
astubbs wants to merge 8 commits into
masterfrom
fix/release-drafter

Conversation

@astubbs
Copy link
Copy Markdown
Owner

@astubbs astubbs commented Apr 17, 2026

depends on #160

Summary

Remove the pull_request trigger from the release-drafter workflow. On PR events, the action tried to update the draft release with refs/pull/N/merge as the target_commitish, which the GitHub Release API rejects (Validation Failed: invalid target_commitish).

The trigger was originally for autolabeling PRs, but no autolabeler rules are configured in .github/release-drafter.yml, so it did nothing useful. The workflow now only runs on push to master, where updating the draft release actually works.

Test plan

  • actionlint clean
  • CI green — update_release_draft check should no longer appear (or fail) on PRs
  • On next push to master, release draft is updated correctly

🤖 Generated with Claude Code

astubbs and others added 8 commits April 11, 2026 03:58
Bring CI tooling and the build configuration up to date so the project
builds cleanly on current JDK 17 patches and so workflow regressions are
caught automatically.

Workflows:
- Add an actionlint job to ci.yml that gates the test job, so broken
  workflow YAML can never reach master again
- Bump Java matrix from [17, 18] (18 is EOL) to [17, 21] (LTS)
- Pin every action to a full commit SHA with a trailing version comment
  for supply chain safety; Dependabot keeps the SHA + comment in sync
- Update all actions to current latest: checkout v6.0.2, cache v5.0.4,
  setup-java v5.2.0, cancel-workflow-action 0.13.1, release-drafter v7.2.0
  (release-drafter v5 used Node 16 and could no longer run on GH runners)
- Remove the broken publish_snapshot_github job from release.yml: it had
  a missing job dependency, a malformed shell command, and a YAML
  indentation error and could never have executed
- Note in dependabot.yml that actions are SHA-pinned

Build:
- Bump Lombok 1.18.24 -> 1.18.34 to fix a JCImport.qualid NoSuchFieldError
  on JDK 17.0.7+
- Merge two duplicate maven-jar-plugin entries in pluginManagement: the
  second declaration silently dropped the 3.2.2 version pin and let
  Maven resolve to 3.4.1, which is stricter and rejected the redundant
  unclassified jar execution
- Remove the redundant explicit jar goal binding (the default execution
  already binds it)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
'.* ' matched every dot-prefixed path — including .github/, .run/, .mvn/, and
.gitignore itself. The only reason tracked files under those directories
still worked was that git honours the index over ignore rules for existing
files, but `git add` refused any new paths in them without -u/-f.

Replace with explicit entries for what was actually intended to be ignored
(.DS_Store, .claude/). The other dot-directory ignores (.idea/, .project,
.classpath, .settings, .clover, .mtj.tmp/) were already listed explicitly
above the removed '.*' line.

Verified: git status --ignored is unchanged; .github/ and .run/ are no
longer shadowed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The dependency was declared twice consecutively with identical groupId,
artifactId, version (1.2.11), and scope (test). Maven emitted a warning
about the non-unique declaration; removing the duplicate clears it.

No runtime effect — Maven was resolving the same dependency either way.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Only flogger-slf4j-backend is actually consumed as a dependency in the
tree (generator/pom.xml). The three other backends pinned in
<dependencyManagement> — flogger-system-backend, flogger-maven-backend,
and flogger-log4j2-backend — were never declared anywhere, so their
pins did nothing.

flogger-system-backend still resolves as a transitive dependency of
flogger-slf4j-backend at the version that flogger itself requires, so
removing the pin does not change what Maven resolves.

Verified: mvn dependency:tree output for the generator module is
identical before and after.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Ports the check-dependencies.yml workflow from
astubbs/parallel-consumer@dev/ci-tweak. Uses
astubbs/dependencies-action (a fork of gregsdennis/dependencies-action
with auto-unblocking of children when parents merge) to enforce any
"depends on #N" references in PR descriptions.

Action SHA-pinned, consistent with the rest of the workflow files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributors (human or agent) need to know that when opening a stacked
PR, the description must include 'depends on #N' so the new
check-dependencies workflow can gate the merge.

Starts minimal; expand later to mirror more of a project rules file if
useful.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The release-drafter workflow triggered on both push and pull_request
events. On PRs, the action attempted to update the draft release with
refs/pull/N/merge as the target_commitish, which the GitHub Release API
rejects as invalid.

The pull_request trigger was originally intended for autolabeling, but
no autolabeler rules are configured in .github/release-drafter.yml, so
it served no purpose. Removing it so the workflow only runs on push to
master, which is the only context where updating the draft release makes
sense.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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