Sync eng/common directory with azure-sdk-tools for PR 15134#48820
Open
Sync eng/common directory with azure-sdk-tools for PR 15134#48820
Conversation
Agent-Logs-Url: https://github.com/Azure/azure-sdk-tools/sessions/0a4d8e3c-c96b-4265-905c-5f8918876354 Co-authored-by: raych1 <20296335+raych1@users.noreply.github.com>
Co-authored-by: Ray Chen <raychen@microsoft.com>
…eSpace guard Agent-Logs-Url: https://github.com/Azure/azure-sdk-tools/sessions/61d68e76-9b14-444b-b244-44d770e9a9b2 Co-authored-by: raych1 <20296335+raych1@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Syncs eng/common with azure-sdk-tools PR 15134 by enhancing the APIView PR comment generation to optionally include a link back to the GitHub Actions run that produced the comment.
Changes:
- Added an optional
GitHubActionRunUrlparameter to APIView comment helper functions. - Appended a footer to the generated PR comment that links to the triggering workflow run when the URL is provided.
| $AuthToken, | ||
| [string]$GitHubActionRunUrl = "" | ||
| ) | ||
| . ${PSScriptRoot}\..\common.ps1 |
There was a problem hiding this comment.
GitHubActionRunUrl is added to support a workflow-run link in the generated PR comment, but in this repo the only invocation of Set-ApiViewCommentForRelatedIssues (in .github/workflows/post-apiview.yml) doesn’t pass this parameter. As a result, the new footer will never be emitted. Consider wiring the workflow to pass the current run URL (or remove the parameter/footer if it’s not intended to be used here).
Suggested change
| . ${PSScriptRoot}\..\common.ps1 | |
| . ${PSScriptRoot}\..\common.ps1 | |
| if ([string]::IsNullOrWhiteSpace($GitHubActionRunUrl)) { | |
| $githubServerUrl = $env:GITHUB_SERVER_URL | |
| $githubRepository = $env:GITHUB_REPOSITORY | |
| $githubRunId = $env:GITHUB_RUN_ID | |
| if (-not [string]::IsNullOrWhiteSpace($githubServerUrl) ` | |
| -and -not [string]::IsNullOrWhiteSpace($githubRepository) ` | |
| -and -not [string]::IsNullOrWhiteSpace($githubRunId)) { | |
| $GitHubActionRunUrl = "$githubServerUrl/$githubRepository/actions/runs/$githubRunId" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#15134 See eng/common workflow