Merge branch 'main' into config-compress

This commit is contained in:
Psyi Rius 2024-08-08 01:10:52 -07:00 committed by GitHub
commit 806c56081c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 7 deletions

View File

@ -30,14 +30,19 @@ jobs:
fi fi
for discussion_id in $discussion_ids; do for discussion_id in $discussion_ids; do
echo "Closing discussion #$discussion_id" echo "Attempting to close discussion #$discussion_id"
response=$(curl -s -o /dev/null -w "%{http_code}" -X PATCH -H "Authorization: token $GITHUB_TOKEN" \ response=$(curl -s -X PATCH -H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
-d '{"state": "closed"}' \ -d '{"state": "closed"}' \
"https://api.github.com/repos/${{ github.repository }}/discussions/$discussion_id") "https://api.github.com/repos/${{ github.repository }}/discussions/$discussion_id")
if [ "$response" -ne 200 ]; then if echo "$response" | jq -e '.id' > /dev/null; then
echo "Failed to close discussion #$discussion_id. HTTP status code: $response" echo "Successfully closed discussion #$discussion_id"
exit 1 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 fi
done done
shell: bash shell: bash
continue-on-error: true

View File

@ -28,7 +28,7 @@ function Get-LatestRelease {
function RedirectToLatestPreRelease { function RedirectToLatestPreRelease {
$latestRelease = Get-LatestRelease $latestRelease = Get-LatestRelease
if ($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 { } else {
Write-Host 'Unable to determine latest pre-release version.' -ForegroundColor Red Write-Host 'Unable to determine latest pre-release version.' -ForegroundColor Red
Write-Host "Using latest Full Release" Write-Host "Using latest Full Release"