From dfa3b12f483588f2a4f1e54df7ca9187f04d32a5 Mon Sep 17 00:00:00 2001 From: xXJsonDeruloXx Date: Wed, 30 Sep 2026 09:14:30 -0400 Subject: [PATCH] ci: remove PR approval gates from signed releases --- .github/workflows/build.yml | 2 +- .github/workflows/pr-release-publish.yml | 20 ++------------------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df1071dc..7f5d7790 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -385,7 +385,7 @@ jobs: success) echo "### Build passed" echo - echo "The \`droiddeck-apk\` artifact is [on this run]($RUN_URL), signed with the public test key. After approval, a maintainer can run **PR Release Publish** from \`main\` to create an APK that installs over the release." + echo "The \`droiddeck-apk\` artifact is [on this run]($RUN_URL), signed with the public test key. A maintainer can run **PR Release Publish** from \`main\` to create an APK that installs over the release." ;; failure) echo "### ERROR: Build failed" diff --git a/.github/workflows/pr-release-publish.yml b/.github/workflows/pr-release-publish.yml index cbd532c4..5f9bec80 100644 --- a/.github/workflows/pr-release-publish.yml +++ b/.github/workflows/pr-release-publish.yml @@ -5,7 +5,7 @@ on: workflow_dispatch: inputs: pr_number: - description: Open, approved pull request + description: Open pull request required: true type: number @@ -27,7 +27,7 @@ jobs: head_sha: ${{ steps.gate.outputs.head_sha }} label: ${{ steps.gate.outputs.label }} steps: - - name: Check the PR, review, and build + - name: Check the PR and build id: gate env: GH_TOKEN: ${{ github.token }} @@ -52,19 +52,6 @@ jobs: any(.pull_requests[]?; .number == $number and .head.sha == $head and .base.sha == $base) ' <<<"$run" >/dev/null - approved=$(gh api --paginate --slurp \ - "repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/reviews?per_page=100" | - jq -r --arg head "$head" '[.[][] | select(.commit_id == $head)] | - group_by(.user.login) | map(max_by(.id)) | .[] | - select(.state == "APPROVED") | .user.login') - maintainer_approved=false - while IFS= read -r reviewer; do - [[ -n "$reviewer" ]] || continue - permission=$(gh api "repos/$GITHUB_REPOSITORY/collaborators/$reviewer/permission" --jq .permission) - [[ "$permission" == write || "$permission" == admin ]] && maintainer_approved=true - done <<<"$approved" - [[ "$maintainer_approved" == true ]] || { echo '::error::A maintainer must approve this commit'; exit 1; } - sdk=${ANDROID_HOME:-${ANDROID_SDK_ROOT:-}} tools=$(find "$sdk/build-tools" -mindepth 1 -maxdepth 1 -type d | sort -V | tail -1) stable_tag=$(gh api repos/The412Banner/DroidDeck/releases/latest --jq .tag_name) @@ -89,9 +76,6 @@ jobs: .state == "open" and .draft == false and .base.ref == "main" and .head.sha == $head and .base.sha == $base ' <<<"$current" >/dev/null - [[ $(gh pr view "$PR_NUMBER" -R "$GITHUB_REPOSITORY" --json reviewDecision --jq .reviewDecision) == APPROVED ]] || { - echo '::error::The current PR revision still needs approval'; exit 1; - } { echo "run_id=$run_id" echo "head_sha=$head"