Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print more informational branch info for previous builds #366

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

achilleas-k
Copy link
Member

When a manifest has already been built, we would assume it was on a PR and print a link to the PR in the info message. But new manifests can also appear on the merge queue (from the rebase) so let's handle that case too. We can't link to it directly because the merge queue branch is deleted after it's merged, but the commit ID is enough info to recreate the build conditions if needed and the name of the merge queue branch includes the PR number if more context is needed.

If the PR field is empty, print an appropriate message too. This shouldn't happen now, the condition was there while old info existed that is all gone now, but let's keep it in case something unexpected happens with the writing of the build info in the future.

When a manifest has already been built, we would assume it was on a PR
and print a link to the PR in the info message.  But new manifests can
also appear on the merge queue (from the rebase) so let's handle that
case too.  We can't link to it directly because the merge queue branch
is deleted after it's merged, but the commit ID is enough info to
recreate the build conditions if needed and the name of the merge queue
branch includes the PR number if more context is needed.

If the PR field is empty, print an appropriate message too.  This
shouldn't happen now, the condition was there while old info existed
that is all gone now, but let's keep it in case something unexpected
happens with the writing of the build info in the future.
Copy link
Contributor

@bcl bcl left a comment

Choose a reason for hiding this comment

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

Nice improvement!

@bcl bcl added this pull request to the merge queue Jan 15, 2024
Merged via the queue into osbuild:main with commit 65d5643 Jan 15, 2024
10 checks passed
@achilleas-k achilleas-k deleted the test/better-pr-print branch January 16, 2024 00:37
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