Skip to content

Label dependency update PRs and drop pull_request_target - #1454

Merged
pacostas merged 3 commits into
mainfrom
fix/dependency-semver-label-and-pr-trigger
Nov 11, 2026
Merged

pacostas merged 3 commits into
mainfrom
fix/dependency-semver-label-and-pr-trigger

Conversation

@dmikusa

@dmikusa dmikusa commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Dependency update PRs were opened without a semver label, so they immediately failed the required semver check. The PR label workflow also used pull_request_target.

What changed

  • Added actions/tools/setup, a bash composite action that installs jam and libpak-tools from scripts/.util/tools.json. Individual versions can be overridden with jam-version / libpak-tools-version, so it also works without a config file.
  • The update-from-metadata action now uses that setup action and calls libpak-tools ci calculate-semver-bump, which has unit tests in libpak-tools. The implementation dependency update workflow uses the result to add semver:major, semver:minor, or semver:patch when opening the PR.
  • The label-pr workflows now use pull_request instead of pull_request_target, with explicit GITHUB_TOKEN write permissions. Same-repo and Dependabot PRs are still auto-labeled; fork PRs are skipped because they receive a read-only token.

Verification

  • go test ./... in libpak-tools.
  • Ran the setup action against jam and libpak-tools releases locally.
  • Ran yamllint, shellcheck, and scripts/sanity.sh.

Depends on paketo-buildpacks/libpak-tools#129 and a libpak-tools release containing the new ci calculate-semver-bump command. The current tools.json pin is v0.6.0, so the pin needs bumping after that release.

Note

This PR was written by opencode and reviewed by a human.

@dmikusa
dmikusa requested review from a team as code owners November 5, 2026 13:13
@dmikusa
dmikusa requested review from nicolasbender and pacostas and removed request for a team November 5, 2026 13:13
anthonydahanne
anthonydahanne previously approved these changes Nov 5, 2026
@dmikusa
dmikusa force-pushed the fix/dependency-semver-label-and-pr-trigger branch 2 times, most recently from ee1444f to 66de2ec Compare November 7, 2026 04:26
@dmikusa
dmikusa changed the base branch from add-multi-implementation to main November 7, 2026 04:26
@dmikusa
dmikusa dismissed anthonydahanne’s stale review November 7, 2026 04:26

The base branch was changed.

Comment thread actions/tools/setup/setup.sh Resolved
Compute the highest semver bump between buildpack.toml before and after the update and expose it as semver_bump. Use it to add semver:major/minor/patch when opening dependency update pull requests.
Run the label workflow on pull requests with explicit GITHUB_TOKEN write permissions. Same-repo and Dependabot pull requests can still be auto-labeled, while fork pull requests are skipped because they receive a read-only token.
Add a setup tools action that installs jam and libpak-tools from scripts/.util/tools.json or input versions. Replace the inline jam install and Python helper in update-from-metadata with the setup action and libpak-tools ci calculate-semver-bump.
@pacostas
pacostas force-pushed the fix/dependency-semver-label-and-pr-trigger branch from 470d907 to 9afe6ad Compare November 11, 2026 15:52
@pacostas
pacostas merged commit 4350f61 into main Nov 11, 2026
4 checks passed
@pacostas
pacostas deleted the fix/dependency-semver-label-and-pr-trigger branch November 11, 2026 15:55
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.

3 participants