1
-
2
-
3
1
# example calls:
4
2
# .\update-fork.ps1 -orgName "rajbos-actions" -userName "xxx" -PAT $env:GitHubPAT $issueTitle "Parent repository for [rajbos/azure-docs] has updates available"
5
3
@@ -38,7 +36,7 @@ function UpdateFork {
38
36
)
39
37
40
38
$forkUrl = GetForkCloneUrl - fork $fork - PAT $PAT
41
-
39
+
42
40
# set user settings
43
41
git config -- global user.email " noreply@githubupdater.com"
44
42
git config -- global user.name " GitHub Fork Updater"
@@ -91,7 +89,7 @@ function Main {
91
89
)
92
90
93
91
Write-Host " Starting the update for issue with title [$issueTitle ] having number [$issueId ] on repository [$issuesRepository ] and a PAT that has length [$ ( $PAT.Length ) ]"
94
-
92
+
95
93
$workflowRunUrl = " $ ( $env: GITHUB_SERVER_URL ) /$ ( $env: GITHUB_REPOSITORY ) /actions/runs/$ ( $env: GITHUB_RUN_ID ) "
96
94
Write-Host " Found workflowRunUrl: [$workflowRunUrl ]"
97
95
@@ -100,7 +98,7 @@ function Main {
100
98
$forkResult = UpdateFork - fork $fork - PAT $PAT
101
99
if ($forkResult -eq 1 ) {
102
100
Write-Host " Error with the update of the fork, halting execution"
103
- AddCommentToIssue - number $issueId - message " :alert : Found merge conflicts, aborting the update" - repoName $issuesRepository - PAT $PAT
101
+ AddCommentToIssue - number $issueId - message " :warning : Found merge conflicts, aborting the update" - repoName $issuesRepository - PAT $PAT
104
102
return 1
105
103
}
106
104
@@ -110,7 +108,7 @@ function Main {
110
108
111
109
# make sure we are back where we started (for easier local testing)
112
110
Set-Location $PSScriptRoot
113
-
111
+
114
112
AddCommentToIssue - number $issueId - message " Fork has been updated" - repoName $issuesRepository - PAT $PAT
115
113
CloseIssue - number $issueId - issuesRepositoryName $issuesRepository - PAT $PAT
116
114
}
0 commit comments