Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
b36706e
Create workflow
dstrome Jul 12, 2024
e023f20
Merge pull request #13587 from MicrosoftDocs/workflows-test
dstrome Jul 12, 2024
6c6d56b
add pull_request_target event
dstrome Jul 12, 2024
8c25438
Merge pull request #13589 from MicrosoftDocs/workflows-test
dstrome Jul 12, 2024
0cf00ae
Create Shared-ProtectedFiles.yml
dstrome Jul 16, 2024
a769bb9
Merge pull request #13591 from MicrosoftDocs/workflows-test
dstrome Jul 16, 2024
e6d80ec
Merge branch 'public' into workflows-test
dstrome Jul 16, 2024
28ef27e
Merge branch 'workflows-test' into workflows-prod
dstrome Jul 16, 2024
f2bf97b
add pr file count messages
dstrome Jul 17, 2024
a326cf4
Merge pull request #13593 from MicrosoftDocs/dstrome-wf-messages
dstrome Jul 17, 2024
4680bab
Merge branch 'workflows-prod' into workflows-test
dstrome Jul 17, 2024
d85d1f1
Merge pull request #13594 from MicrosoftDocs/workflows-test
dstrome Jul 17, 2024
0a75e09
Support pagination
dstrome Jul 17, 2024
3397750
add pr file count workflow
dstrome Jul 18, 2024
3853802
Merge pull request #13595 from MicrosoftDocs/workflows-test
dstrome Jul 18, 2024
9940230
Create LiveMergeCheck-LiveMergeMessage.md
dstrome Jul 18, 2024
7afbe30
Merge pull request #13597 from MicrosoftDocs/workflows-test
dstrome Jul 18, 2024
b469c2f
add live merge check workflow
dstrome Jul 18, 2024
39bddfc
Merge pull request #13598 from MicrosoftDocs/workflows-test
dstrome Jul 18, 2024
1526761
Switch to exit code instead of statuses API
dstrome Jul 24, 2024
f5a6576
remove RequestID reference
dstrome Jul 24, 2024
3c54559
Add new workflow
dstrome Jul 29, 2024
6106a05
Update protected files list
dstrome Jul 29, 2024
ef70601
new workflow
dstrome Jul 29, 2024
6f79013
Merge pull request #13603 from MicrosoftDocs/workflows-test
dstrome Jul 29, 2024
69e6f5e
Fixed submitter bug and added exception handling for team membership …
dstrome Jul 30, 2024
062f6da
Merge pull request #13606 from MicrosoftDocs/workflows-test
dstrome Jul 30, 2024
7968010
Switch to ubuntu and close loophole
dstrome Jul 31, 2024
c1a4b93
Switch to ubuntu
dstrome Jul 31, 2024
49a8989
Merge pull request #13609 from MicrosoftDocs/workflows-test
dstrome Jul 31, 2024
7e20214
Add job summary outputs
dstrome Aug 2, 2024
8795f5a
Merge pull request #13611 from MicrosoftDocs/workflows-test
dstrome Aug 2, 2024
c268c95
remove "license"
dstrome Aug 8, 2024
9aaa5de
Merge pull request #13612 from MicrosoftDocs/workflows-test
dstrome Aug 8, 2024
24737e1
Improve file matching
dstrome Aug 8, 2024
e418431
Add job summary
dstrome Aug 8, 2024
1911214
Remove break
dstrome Aug 8, 2024
21fedf3
Merge pull request #13614 from MicrosoftDocs/workflows-test
dstrome Aug 8, 2024
73ae874
New workflow
dstrome Aug 13, 2024
f694be1
Merge pull request #13619 from MicrosoftDocs/workflows-test
dstrome Aug 13, 2024
dbe85dd
Account for multiple artifacts
dstrome Aug 14, 2024
312b905
Merge pull request #13621 from MicrosoftDocs/workflows-test
dstrome Aug 14, 2024
cab6a9d
Create Shared-TierManagement.yml
dstrome Aug 23, 2024
66d7278
Merge pull request #13626 from MicrosoftDocs/workflows-test
dstrome Aug 23, 2024
ac02b40
Add files to protected file list
dstrome Sep 20, 2024
cf014e9
Add exception handling for Set-PrAssignee
dstrome Sep 20, 2024
a86d1fd
Merge pull request #13641 from MicrosoftDocs/workflows-test
dstrome Sep 20, 2024
4d10094
Add start date to stale.yml
dstrome Sep 20, 2024
dbac9da
Merge pull request #13642 from MicrosoftDocs/workflows-test
dstrome Sep 20, 2024
99d5c6e
update stale and close messages
dstrome Sep 23, 2024
49036a3
Merge pull request #13647 from MicrosoftDocs/workflows-test
dstrome Sep 30, 2024
e9a85c3
Add month selection step
dstrome Oct 1, 2024
3bc10f6
Merge pull request #13650 from MicrosoftDocs/workflows-test
dstrome Oct 1, 2024
d4fbade
Update starting week date
dstrome Nov 4, 2024
894621c
Merge pull request #13665 from MicrosoftDocs/workflows-test
dstrome Nov 4, 2024
45679b4
Add BuildValidation workflow
dstrome Nov 21, 2024
b90a26e
Update Shared-BuildValidation.yml
dstrome Nov 22, 2024
8691127
Merge pull request #13710 from MicrosoftDocs/workflows-test
dstrome Jan 16, 2025
b277426
resolve merge conflict
dstrome Jan 16, 2025
59a1d56
Merge pull request #13711 from MicrosoftDocs/workflows-test
dstrome Jan 16, 2025
6570e57
Add build validation workflows to protected file list.
dstrome Jan 28, 2025
b605b6e
Merge pull request #13720 from MicrosoftDocs/workflows-test
dstrome Jan 28, 2025
c37e4e4
Add throw to fail check
dstrome Jan 30, 2025
791c2e5
Merge pull request #13727 from MicrosoftDocs/workflows-test
dstrome Jan 30, 2025
f157b37
Merge branch 'public' into workflows-test
dstrome Feb 5, 2025
b7b08a0
Merge branch 'workflows-test' into workflows-prod
dstrome Feb 5, 2025
4378c6c
switch from PAT to GitHub app
dstrome Mar 10, 2025
1aa7f58
Merge branch 'public' into workflows-test
dstrome Mar 10, 2025
09c182a
Merge pull request #13745 from MicrosoftDocs/workflows-test
dstrome Mar 10, 2025
933196c
Comment out start date code
dstrome Mar 12, 2025
a95780c
Merge pull request #13747 from MicrosoftDocs/workflows-test
dstrome Mar 12, 2025
c680561
Update Inactive message
dstrome Mar 13, 2025
8094ed3
Merge pull request #13748 from MicrosoftDocs/workflows-test
dstrome Mar 13, 2025
b3dcdbe
Create Shared-StaleBranch.yml
dstrome Mar 13, 2025
3d6d3f6
Add some error checking and validation
dstrome Mar 14, 2025
1440307
Merge pull request #13749 from MicrosoftDocs/workflows-test
dstrome Mar 14, 2025
6a52326
Improve reporting
dstrome Mar 24, 2025
b20a16a
Merge pull request #13767 from MicrosoftDocs/workflows-test
dstrome Mar 24, 2025
a9e6104
Remove duplicated heading
dstrome Mar 25, 2025
0ec4a20
Merge pull request #13769 from MicrosoftDocs/workflows-test
dstrome Mar 25, 2025
a1962ae
Add check to run only if triggered from MicrosoftDocs repo
dstrome Mar 25, 2025
cc28756
Merge pull request #13771 from MicrosoftDocs/workflows-test
dstrome Mar 25, 2025
4d7ab46
Delete .github/workflows/StaleBranch-Test.yml
dstrome Mar 27, 2025
4805a51
Add StaleBranch workflow files
dstrome Apr 1, 2025
7c97405
Merge pull request #13787 from MicrosoftDocs/workflows-test
dstrome Apr 1, 2025
56052cb
Create Shared-Publish.yml
dstrome Apr 9, 2025
b40256c
Merge pull request #13792 from MicrosoftDocs/workflows-test
dstrome Apr 9, 2025
5cd2235
Merge branch 'public' into workflows-test
dstrome Apr 9, 2025
0e928a5
Merge pull request #13793 from MicrosoftDocs/workflows-test
dstrome Apr 9, 2025
f1e82a7
Rename AutoPublish workflow
dstrome Apr 10, 2025
4356747
Merge pull request #13796 from MicrosoftDocs/workflows-test
dstrome Apr 10, 2025
c8d036d
Add AutoPublish workflows, update protected files approver list
dstrome Apr 11, 2025
6c4af6b
Merge pull request #13797 from MicrosoftDocs/workflows-test
dstrome Apr 11, 2025
9e6e1cc
Add 'DeleteOnDayOfMonth' functionality
dstrome Apr 16, 2025
cff936b
Merge pull request #13806 from MicrosoftDocs/workflows-test
dstrome Apr 16, 2025
152d1fa
Add check for PubOps/non-PubOps repos
dstrome Apr 18, 2025
81bda3d
Merge pull request #13808 from MicrosoftDocs/workflows-test
dstrome Apr 18, 2025
84bc19e
Correct manual merge label color
dstrome Apr 18, 2025
c8c6eba
Merge pull request #13809 from MicrosoftDocs/workflows-test
dstrome Apr 18, 2025
04878a1
Add report/delete functionality
dstrome Apr 21, 2025
fb01329
Merge pull request #13812 from MicrosoftDocs/workflows-test
dstrome Apr 21, 2025
415d207
hyperlink BC
dstrome Apr 23, 2025
03f3ed2
Merge pull request #13815 from MicrosoftDocs/workflows-test
dstrome Apr 23, 2025
56e3ae9
Add days since last commit as of deletion day to tables, center columns
dstrome Apr 23, 2025
3c0e7bc
Merge pull request #13816 from MicrosoftDocs/workflows-test
dstrome Apr 23, 2025
f11c953
Remove creator from delete table
dstrome Apr 25, 2025
cc18f0d
Add link to view branch in delete table
dstrome Apr 25, 2025
e7ea62f
Merge pull request #13819 from MicrosoftDocs/workflows-test
dstrome Apr 25, 2025
c7a0e11
Merge branch 'public' into workflows-test
dstrome Apr 28, 2025
169bff1
Uncomment Invoke delete commands
dstrome Apr 28, 2025
7427d60
Merge pull request #13821 from MicrosoftDocs/workflows-test
dstrome Apr 28, 2025
cdb306b
Retrieve PR info for watch branches if available
dstrome Apr 29, 2025
da5c29b
Merge pull request #13823 from MicrosoftDocs/workflows-test
dstrome Apr 29, 2025
23f9ecf
Create Shared-AutoPublishV2.yml
dstrome May 27, 2025
4feef6a
Merge pull request #13855 from MicrosoftDocs/workflows-test
dstrome May 27, 2025
ba78b32
Enable close issues
dstrome May 30, 2025
ad543f8
Merge pull request #13862 from MicrosoftDocs/workflows-test
dstrome May 30, 2025
49351cc
Create AutoLabelMsftContributor-PrCloseMessage.md
dstrome Jun 8, 2025
f06dc1b
Merge pull request #13866 from MicrosoftDocs/workflows-test
dstrome Jun 8, 2025
7496d09
add additional info to message
dstrome Jun 8, 2025
dff3e84
Merge pull request #13867 from MicrosoftDocs/workflows-test
dstrome Jun 8, 2025
aeea2d2
add 'browser extension' clarification
dstrome Jun 23, 2025
5ee90b5
Add PR close functionality
dstrome Jun 23, 2025
2ea7d5c
Merge pull request #13872 from MicrosoftDocs/workflows-test
dstrome Jun 23, 2025
09b71b7
disable read-only sign off globally
dstrome Jul 15, 2025
c59bd5e
Merge pull request #13884 from MicrosoftDocs/workflows-test
dstrome Jul 15, 2025
17abd64
Update Shared-TierManagement.yml
dstrome Aug 11, 2025
3056171
Merge pull request #13892 from MicrosoftDocs/workflows-test
dstrome Aug 11, 2025
c5857a8
Skip running for m365-skilling-repo-management[bot]
dstrome Aug 12, 2025
2504fe0
Merge pull request #13893 from MicrosoftDocs/workflows-test
dstrome Aug 12, 2025
7461394
Update set as draft workflow to run only if user isn't a bot
dstrome Aug 19, 2025
2b6dc1b
Update contact info to ask an admin
dstrome Aug 19, 2025
c851a61
Merge pull request #13895 from MicrosoftDocs/workflows-test
dstrome Aug 19, 2025
107e2c3
Add assign reviewers functionality
dstrome Oct 2, 2025
86c1083
Add AutoLabelAssign-ContentLeadReviewNotice.md
dstrome Oct 2, 2025
7e19a68
Add PR message post and org validation
dstrome Oct 2, 2025
2ce6efd
Only add reviewers on draft and if userperms = read
dstrome Oct 3, 2025
2f4b7d3
Correct permissions url
dstrome Oct 3, 2025
10ea272
Update reviewer notification message for clarity
dstrome Oct 4, 2025
b9ac768
Add existing reviewers check
dstrome Oct 5, 2025
aa7a4f0
Merge pull request #13899 from MicrosoftDocs/workflows-test
dstrome Oct 6, 2025
8d24517
Handle null reviewer array and missing file service
dstrome Oct 6, 2025
70eb2c6
Merge pull request #13900 from MicrosoftDocs/workflows-test
dstrome Oct 6, 2025
32eab1b
switching pr message and mapping file to prod
dstrome Oct 7, 2025
50b77af
Merge pull request #13901 from MicrosoftDocs/workflows-test
dstrome Oct 7, 2025
cc8b9d5
Hook up auto reviewer enable/disable toggle
dstrome Oct 7, 2025
74259fd
Merge pull request #13902 from MicrosoftDocs/workflows-test
dstrome Oct 7, 2025
9d12539
Scope to build repos only
dstrome Oct 8, 2025
269fda2
Merge pull request #13903 from MicrosoftDocs/workflows-test
dstrome Oct 8, 2025
4151998
Add logging functionality
dstrome Oct 10, 2025
13afa99
Merge pull request #13904 from MicrosoftDocs/workflows-test
dstrome Oct 10, 2025
6af8d7a
ignore bots, improve enums, fix perm check
dstrome Oct 10, 2025
8cc58f9
Merge pull request #13905 from MicrosoftDocs/workflows-test
dstrome Oct 10, 2025
bbbc928
Clarify sign off label requirements for reviewers
dstrome Oct 15, 2025
ae04e0a
Merge pull request #13906 from MicrosoftDocs/workflows-test
dstrome Oct 15, 2025
da83c98
Replace Ask An Admin with TC > General
garymoore-sc Oct 27, 2025
5dcff75
Merge pull request #13908 from MicrosoftDocs/garymoore-sc-patch-1
garycentric Oct 27, 2025
7ce0033
Update Ask An Admin to TC > General
garycentric Oct 27, 2025
7d17dc5
Merge pull request #13909 from MicrosoftDocs/garycentric-patch-1
garycentric Oct 27, 2025
15c9ee7
Refactored to use github teams as reviewer lists
dstrome Oct 31, 2025
a539d4e
Fix exclusion list
dstrome Oct 31, 2025
0b11070
Merge pull request #13911 from MicrosoftDocs/workflows-test
dstrome Nov 2, 2025
edf7c80
Add support for docfx author, ms.service, ms.subservice
dstrome Nov 13, 2025
b5ea40b
Update actions/checkout to target the head repo/branch
dstrome Nov 13, 2025
5cbe612
Fix checkout target
dstrome Nov 14, 2025
ae893e9
Merge pull request #13912 from MicrosoftDocs/workflows-test
dstrome Nov 17, 2025
e91b03a
Various fixes
dstrome Nov 20, 2025
3060b40
remove test statement
dstrome Nov 20, 2025
66219cd
Merge pull request #13913 from MicrosoftDocs/workflows-test
dstrome Nov 21, 2025
3c35cdf
Replace aka.ms/AskAnAdmin with aka.ms/tcphelp
garycentric Jan 26, 2026
c7cdf9b
Merge branch 'public' into gary-update-workflows
garycentric Jan 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,611 changes: 1,611 additions & 0 deletions .github/workflows/Shared-AutoLabelAssign.yml

Large diffs are not rendered by default.

450 changes: 450 additions & 0 deletions .github/workflows/Shared-AutoLabelMsftContributor.yml

Large diffs are not rendered by default.

690 changes: 690 additions & 0 deletions .github/workflows/Shared-AutoPublish.yml

Large diffs are not rendered by default.

918 changes: 918 additions & 0 deletions .github/workflows/Shared-AutoPublishV2.yml

Large diffs are not rendered by default.

175 changes: 175 additions & 0 deletions .github/workflows/Shared-BuildValidation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
name: Build validation (shared)

permissions:
pull-requests: write
statuses: write

on:
workflow_call:
inputs:
PayloadJson:
required: true
type: string
secrets:
AccessToken:
required: true

jobs:
build:
name: Run Script
if: github.repository_owner == 'MicrosoftDocs'
runs-on: ubuntu-latest
steps:
- name: Script
shell: pwsh
env:
PayloadJson: ${{ inputs.PayloadJson }}
AccessToken: ${{ secrets.AccessToken }}
BuildUser: "learn-build-service-prod[bot]"

run: |

# Get GitHub data and event
$GitHubData = $env:PayloadJson | ConvertFrom-Json -Depth 50
$GitRequestEvent = $GitHubData.event_name
$BuildUser = $env:BuildUser

$AccessToken = $env:AccessToken

$DefaultBranch = $GitHubData.event.repository.default_branch
$GitHubState = $GitHubData.event.issue.state
$GitHubAction = $GitHubData.event.action
$GitHubSender = $GitHubData.event.sender.login
$GitHubRepoName = $GitHubData.event.repository.name
$CommentUser = $GitHubData.event.comment.user.login
$PrIssueNumber = $GitHubData.event.issue.number
$PrUrl = $GitHubData.event.issue.pull_request.url

$GitHubHeaders = @{}
$GitHubHeaders.Add("Authorization","token $($AccessToken)")
$GitHubHeaders.Add("User-Agent", "OfficeDocs")

$StatusUrl = "https://review.learn.microsoft.com/en-us/office-authoring-guide/pr-criteria?branch=main"
$StatusCheckName = "PR has no warnings or errors"
$Status = @{}
$Status.Add("context", $StatusCheckName)
$Status.Add("target_url", $StatusUrl)

$ValidationRegex = "(?m)\s*(Validation status: )([Pp]assed|[Ss]uggestion[s]?|[Ww]arning[s]?|[Ee]rror[s]?)\s*$"

Write-Host "Repo: $GitHubRepoName"
Write-Host "Sender: $GitHubSender"
Write-Host "Request event: $GitRequestEvent"
Write-Host "GitHub action: $GitHubAction"
Write-Host "GitHub state: $GitHubState"
Write-Host "Default branch: $DefaultBranch"
Write-Host "PR number: $PrIssueNumber"

# Make the job summary section show up so the job always looks consistent.
echo "" >> $env:GITHUB_STEP_SUMMARY

If (($GitRequestEvent -eq "issue_comment") -and (($GitHubAction -eq "created"))) {

Write-Host "Comment added on PR."

If ($CommentUser -eq $BuildUser) {

Write-Host "Comment from $BuildUser. Processing."

# Get the contents of the comment that was added to the PR
$CommentBody = $GitHubData.event.comment.body

# Check to see if comment contains validation status
$StatusFound = $CommentBody -match $ValidationRegex

If ($StatusFound) {

Write-Host "Regex result: $StatusFound."

$ValidationResult = $Matches[2]

Write-Host "Validation status: $ValidationResult"

$PrData = Invoke-RestMethod -Method GET -ContentType "application/json" -Headers $GitHubHeaders -Uri $PrUrl -ErrorAction Stop
$StatusUrl = $PrData.statuses_url
$PrHtmlUrl = $PrData.html_url

Write-Host "PR status url: $StatusUrl"

If (($ValidationResult -like "*error*") -or ($ValidationResult -like "*warning*")) {

# Populates the job summary if an PR validation has an error or warning.
echo "# Pull request validation error" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "Build validation completed with a status of `"$ValidationResult`" in PR: $PrHtmlUrl. Builds must be free of errors and warnings before PRs can be merged." >> $env:GITHUB_STEP_SUMMARY

# Capitalize first letter of result.
$CapValidationResult = $ValidationResult.Substring(0,1).ToUpper() + $ValidationResult.Substring(1)

$Status.state = "failure"
$Status.description = "Blocking merge. $CapValidationResult must be resolved before merge."

} ElseIf ($ValidationResult -like "*suggestion*") {

write-host "Build validation completed with a status of `"$ValidationResult`". Allowing merge."

$Status.state = "success"
$Status.description = "Allowing merge. Please resolve $ValidationResult."

} Else {

write-host "Build validation completed with a status of `"$ValidationResult`". Allowing merge."

$Status.state = "success"
$Status.description = "Allowing merge."

}

$StatusJson = $Status | ConvertTo-Json
$SuccessfulPost = $False
$RetryCount = 0

Do {

Try {

# Send POST request to GitHub
Invoke-RestMethod -Headers $GitHubHeaders -Uri $StatusUrl -Method POST -Body $StatusJson -ErrorAction Stop
$SuccessfulPost = $True

} Catch {

# If the request fails for any reason, retry it after a delay, up to six times.
$RetryCount++
Start-Sleep 1

}

} Until (($SuccessfulPost) -or ($RetryCount -gt 5))


If (($ValidationResult -like "*error*") -or ($ValidationResult -like "*warning*")) {

# Force the workflow to fail so the validation failure can be tracked in Actions.

Throw "Build validation completed with a status of `"$ValidationResult`" in PR: $PrHtmlUrl. Builds must be free of errors and warnings before PRs can be merged."

}

} Else {

Write-Host "Comment was from $BuildUser but no status was found."

}

} Else {

Write-Host "Comment not from $BuildUser. Exiting."

}

} Else {

Write-Host "Not an added comment on PR."

} # PR event and action check
87 changes: 87 additions & 0 deletions .github/workflows/Shared-ExtractPayload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Download and extract payload artifact

permissions:
pull-requests: write
contents: read
actions: read

on:
workflow_call:
inputs:
WorkflowId:
required: true
type: string
OrgRepo:
required: true
type: string
secrets:
AccessToken:
required: true
outputs:
WorkflowPayload:
value: ${{ jobs.build.outputs.JobPayload }}

jobs:
build:
name: Run Script
if: github.repository_owner == 'MicrosoftDocs'
runs-on: ubuntu-latest
outputs:
JobPayload: ${{ steps.get-payload.outputs.WorkflowPayload }}
steps:
- name: Script
id: get-payload
shell: pwsh
env:
WorkflowId: ${{ inputs.WorkflowId }}
AccessToken: ${{ secrets.AccessToken }}
OrgRepo: ${{ inputs.OrgRepo }}

run: |

$AccessToken = $env:AccessToken
$WorkflowId = $env:WorkflowId
$OrgRepo = $env:OrgRepo
$WorkspacePath = "$env:GITHUB_WORKSPACE"

$ArtifactName = "PayloadJson"
$ArtifactFilePath = Join-Path $WorkspacePath -ChildPath "$ArtifactName.zip"
$GitHubDataPath = Join-Path $WorkspacePath -ChildPath "$ArtifactName.json"
$ArtifactUrl = "https://api.github.com/repos/$OrgRepo/actions/runs/$WorkflowId/artifacts"

# Set GitHub REST API headers
$GitHubHeaders = @{}
$GitHubHeaders.Add("Authorization","token $AccessToken")
$GitHubHeaders.Add("User-Agent", "officedocs")

Write-Host "Repo: $OrgRepo"
Write-Host "Parent workflow ID: $WorkflowId"
Write-Host "Workspace path: $WorkspacePath"
Write-Host "Artifact URL: $ArtifactUrl"

Write-Host "Retrieve parent workflow artifacts"
$ArtifactData = Invoke-RestMethod -Uri $ArtifactUrl -Headers $GitHubHeaders

# Using [-1] to get the last element in the array in the event there are mulitple artifacts returned.
$ArtifactDownloadUrl = $ArtifactData.artifacts[-1].archive_download_url

Write-Host "Retrieve payload artifact from $ArtifactDownloadUrl and save to $ArtifactFilePath"
Invoke-RestMethod -Uri $ArtifactDownloadUrl -Headers $GitHubHeaders -OutFile $ArtifactFilePath

Write-Host "Expand artifact payload zip $ArtifactFilePath to $WorkspacePath"
Expand-Archive $ArtifactFilePath -DestinationPath $WorkspacePath

Write-Host "Get payload data from $GitHubDataPath"
$GitHubDataJson = Get-Content $GitHubDataPath -Raw
$GitHubData = $GitHubDataJson | ConvertFrom-Json -Depth 50
$GitRequestEvent = $GitHubData.event_name
$GitHubAction = $GitHubData.event.action
$OriginRepo = $GitHubData.event.repository.full_name
$PrNumber = $GitHubData.event.number

Write-Host "GitHub event: $GitRequestEvent"
Write-Host "GitHub action: $GitHubAction"
Write-Host "Origin repo: $OriginRepo"
Write-Host "PR Number: $PrNumber"

echo "WorkflowPayload=$GitHubDataJson" >> $env:GITHUB_OUTPUT
Loading