[infra] Fix release pipeline #6842
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6840
The comments.login is otelbot-dotnet instead of app/otelbot-dotnet
Changes
Problem
The release automation was failing with the error
Could not find package push comment on prwhen running the/PushPackagescommand on PR #6839.Root cause: The GitHub API returns different
author.loginvalues for GitHub Apps depending on context:app/otelbot-dotnet(includesapp/prefix)otelbot-dotnet(no prefix)The scripts were using the same variable (
expectedPrAuthorUserName) to match both PR authors and comment authors, causing the comment author check to fail.Solution
Introduced a separate parameter
expectedCommentAuthorUserNameto correctly match comment authors.Changes
New GitHub variable required:
AUTOMATION_APPLICATION_LOGIN=otelbot-dotnetFiles modified:
.github/workflows/automation.ymlapplication-loginoutput.github/workflows/publish-packages-1.0.ymlexpectedCommentAuthorUserNametoTryPostPackagesReadyNoticeOnPrepareReleasePullRequest.github/workflows/post-release.ymlexpectedCommentAuthorUserNameto bothPushPackagesPublishReleaseUnlockAndPostNoticeOnPrepareReleasePullRequestandTryPostReleasePublishedNoticeOnPrepareReleasePullRequestbuild/scripts/post-release.psm1expectedCommentAuthorUserNameparameter to 3 functions and use it for comment author matchingMerge requirement checklist
[ ] Unit tests added/updated[ ] AppropriateCHANGELOG.mdfiles updated for non-trivial changes[ ] Changes in public API reviewed (if applicable)