Skip to content

Fixing workflow for labeling PR - #1464

Merged
pacostas merged 1 commit into
paketo-buildpacks:mainfrom
pacostas:fixing-label-pr-workflow
Nov 13, 2026
Merged

pacostas merged 1 commit into
paketo-buildpacks:mainfrom
pacostas:fixing-label-pr-workflow

Conversation

@pacostas

@pacostas pacostas commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Summary

The PR does not use the PAKETO_BOT_GITHUB_TOKEN which (which is a very good thing), https://github.com/paketo-buildpacks/github-config/pull/1454/changes#diff-ee856dade2ba354b6fa1f0dfd5539c02301bd4c77e3a91853393a5e1dc40a7ed

although, when the worklfow runs, on the first time the PR opens, there is no label. This results in failure of the Check Minimal Semver Labels this failure triggers the Auto-label Semver step which adds the label. The Problem is that the PAKETO_BOT_GITHUB_TOKEN is not used anymore and instead GITHUB_TOKEN is being used. This results not retriggering the label-pr.yml workflow, as github does not allow triggering other workflows if GITHUB_TOKEN is being used but only with PAT tokens such as PAKETO_BOT_GITHUB_TOKEN. As a result, the labe-pr.yml file sets the label, but it does not re-trigger itself and action never passes on the protection branch rules.

This PR changes the workflow by only running once, without relying on re-triggering it self. This happens by just checking if there is already a label, otherwise tries to label it and in the end does the check, whether the label has been set or not. That way we also reduce to half, the amount of times the label-pr runs. It also minimizes the errors that appear for the label-pr.yml workflow.

Use Cases

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@pacostas
pacostas requested review from a team as code owners November 12, 2026 17:43
@pacostas
pacostas requested review from jericop and modulo11 November 12, 2026 17:43

@dmikusa dmikusa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me

@sgaist sgaist left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice improvement !

@pacostas
pacostas merged commit 6b83c48 into paketo-buildpacks:main Nov 13, 2026
4 checks passed
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.

4 participants