From 7f043a78689cb00d2685f25ef0f616d7f1e60226 Mon Sep 17 00:00:00 2001 From: David Nguyen Date: Fri, 3 Jul 2026 18:42:14 +0700 Subject: [PATCH 1/2] Revert "Merge branch 'main' into dev" This reverts commit 48330a7d3d0f808300112bf77f94bc160db1bd8e, reversing changes made to f8cad61f73d9b5cdbeab0fc71358cbdc348fb05a. --- .github/workflows/pr-auto-approve.yml | 54 +++++++++++++++++-------- entrypoints/popup/components/Toggle.tsx | 1 - 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/.github/workflows/pr-auto-approve.yml b/.github/workflows/pr-auto-approve.yml index aac2146..88f6089 100644 --- a/.github/workflows/pr-auto-approve.yml +++ b/.github/workflows/pr-auto-approve.yml @@ -44,9 +44,32 @@ jobs: GH_TOKEN: ${{secrets.EPLUS_BOT_TOKEN}} - name: Wait for pull request checks - run: gh pr checks "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --watch --interval 10 + run: | + for attempt in {1..60}; do + CHECKS="$(gh pr checks "$PR_NUMBER" \ + --repo "$GITHUB_REPOSITORY" \ + --json bucket,name,workflow)" + + FAILING_COUNT="$(jq '[.[] | select(.workflow != env.APPROVAL_WORKFLOW and (.bucket == "fail" or .bucket == "cancel"))] | length' <<<"$CHECKS")" + if [ "$FAILING_COUNT" -gt 0 ]; then + jq -r '.[] | select(.workflow != env.APPROVAL_WORKFLOW and (.bucket == "fail" or .bucket == "cancel")) | "::error::\(.workflow): \(.name) failed"' <<<"$CHECKS" + exit 1 + fi + + PENDING_COUNT="$(jq '[.[] | select(.workflow != env.APPROVAL_WORKFLOW and .bucket == "pending")] | length' <<<"$CHECKS")" + if [ "$PENDING_COUNT" -eq 0 ]; then + exit 0 + fi + + echo "Waiting for $PENDING_COUNT pull request check(s) before approving (attempt $attempt/60)." + sleep 10 + done + + echo "::error::Timed out waiting for pull request checks to finish." + exit 1 env: PR_NUMBER: ${{steps.pr.outputs.number}} + APPROVAL_WORKFLOW: ${{github.workflow}} GH_TOKEN: ${{secrets.EPLUS_BOT_TOKEN}} - name: Approve pull request @@ -89,22 +112,19 @@ jobs: fi fi - APPROVAL_COMMENT="$(cat < Date: Fri, 3 Jul 2026 18:46:07 +0700 Subject: [PATCH 2/2] fix: restore Toggle documentation comment --- entrypoints/popup/components/Toggle.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/entrypoints/popup/components/Toggle.tsx b/entrypoints/popup/components/Toggle.tsx index 14c4a51..c521b10 100644 --- a/entrypoints/popup/components/Toggle.tsx +++ b/entrypoints/popup/components/Toggle.tsx @@ -7,6 +7,7 @@ export interface ToggleProps { description?: string; } +/** Labeled switch row used by popup settings. */ export default function Toggle({ enabled, onChange,