From 6ff815eed3628c4ca09131f75027e2d985b0d101 Mon Sep 17 00:00:00 2001 From: MyDrift Date: Thu, 8 Aug 2024 04:06:42 +0200 Subject: [PATCH 1/2] fix windev (#2537) --- windev.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windev.ps1 b/windev.ps1 index 6ad84f4f..3e1805f0 100644 --- a/windev.ps1 +++ b/windev.ps1 @@ -28,7 +28,7 @@ function Get-LatestRelease { function RedirectToLatestPreRelease { $latestRelease = Get-LatestRelease if ($latestRelease) { - $url = "https://raw.githubusercontent.com/ChrisTitusTech/winutil/$latestRelease/winutil.ps1" + $url = "https://github.com/ChrisTitusTech/winutil/releases/download/$latestRelease/winutil.ps1" } else { Write-Host 'Unable to determine latest pre-release version.' -ForegroundColor Red Write-Host "Using latest Full Release" From 1945fe288d0ac36018a3e21056b40a46a67b9210 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Wed, 7 Aug 2024 21:30:15 -0500 Subject: [PATCH 2/2] Update close-discussion-on-pr.yaml --- .github/workflows/close-discussion-on-pr.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/close-discussion-on-pr.yaml b/.github/workflows/close-discussion-on-pr.yaml index bd821b94..7ed0cc07 100644 --- a/.github/workflows/close-discussion-on-pr.yaml +++ b/.github/workflows/close-discussion-on-pr.yaml @@ -30,14 +30,19 @@ jobs: fi for discussion_id in $discussion_ids; do - echo "Closing discussion #$discussion_id" - response=$(curl -s -o /dev/null -w "%{http_code}" -X PATCH -H "Authorization: token $GITHUB_TOKEN" \ + echo "Attempting to close discussion #$discussion_id" + response=$(curl -s -X PATCH -H "Authorization: token $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ -d '{"state": "closed"}' \ "https://api.github.com/repos/${{ github.repository }}/discussions/$discussion_id") - - if [ "$response" -ne 200 ]; then - echo "Failed to close discussion #$discussion_id. HTTP status code: $response" - exit 1 + + if echo "$response" | jq -e '.id' > /dev/null; then + echo "Successfully closed discussion #$discussion_id" + else + error_message=$(echo "$response" | jq -r '.message // "Unknown error"') + echo "Warning: Failed to close discussion #$discussion_id. Error: $error_message" + echo "Full response: $response" fi done shell: bash + continue-on-error: true \ No newline at end of file