Skip to content

Prevent release please pr creating useless pipelines - #484

Open
oldgiova wants to merge 3 commits into
mendersoftware:masterfrom
oldgiova:QA-1732-prevent-release-please-pr-pipelines
Open

Prevent release please pr creating useless pipelines#484
oldgiova wants to merge 3 commits into
mendersoftware:masterfrom
oldgiova:QA-1732-prevent-release-please-pr-pipelines

Conversation

@oldgiova

Copy link
Copy Markdown
Contributor

A release-please PR only changes a CHANGELOG.md and a .release-please-manifest.json file so it's usually useless to run the usual full build/test pipeline for it. What is worse is that every main/master changes are refreshing the PR.

With this change the integration-test-runner is not creating a pipeline when creating/updating a release-please PR, but it's still updating the required github status

Co-authored-with: Claude

Both are needed to report a commit status without running a pipeline and
to inspect the diff between two explicit revisions. No caller yet; this
commit is plumbing only.

Ticket: QA-1732

Signed-off-by: Roberto Giovanardi <roberto.giovanardi@northern.tech>
A pull request opened by the release bot whose diff is confined to
changelog files and the release-please manifest contains nothing a
pipeline can test: its tree is the target branch's tree plus those files.

Ticket: QA-1732

Signed-off-by: Roberto Giovanardi <roberto.giovanardi@northern.tech>
Every push to a default branch runs the changelog job, which force-pushes
the release-please pull request branch. The bot mirrors that to pr_<N>
and creates a pipeline that re-runs work the default branch already did.

Skip pipeline creation for those pull requests and post a success
ci/gitlab status directly, so they still merge on maintainer approval
alone.

The author is read from pull_request.user rather than sender, since the
sender of a synchronize event is whoever pushed. The diff is taken
between the base and head SHAs of the event rather than from the pull
request's implicit current head, so a concurrent push cannot make the
check describe a different commit than the one being marked. Any unmet
condition, any API error, and any failure to post the status falls
through to creating the pipeline as before.

Ticket: QA-1732

Signed-off-by: Roberto Giovanardi <roberto.giovanardi@northern.tech>
@oldgiova
oldgiova force-pushed the QA-1732-prevent-release-please-pr-pipelines branch from d99eb1c to 1dd0c50 Compare August 26, 2026 06:00
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.47967% with 40 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
client/github/mocks/Client.go 0.00% 27 Missing ⚠️
client/github/client.go 0.00% 13 Missing ⚠️

📢 Thoughts on this report? Let us know!

@vpodzime vpodzime 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.

Great! Thanks!

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.

2 participants