Skip to content

Fix auto-approve workflow check waiting#29

Merged
hoangsvit merged 2 commits into
devfrom
codex/kiem-tra-nguyen-nhan-bot-khong-approve-review
Jul 3, 2026
Merged

Fix auto-approve workflow check waiting#29
hoangsvit merged 2 commits into
devfrom
codex/kiem-tra-nguyen-nhan-bot-khong-approve-review

Conversation

@hoangsvit

Copy link
Copy Markdown
Member

Motivation

  • The auto-approve workflow could hang waiting on CI checks because it used gh pr checks --watch, which can include the approval workflow's own in-progress check and block approval.
  • The workflow must fail fast on real failures and only wait for other workflows' pending checks before calling gh pr review --approve.
  • The previous approval comment used an unindented heredoc inside a run: | block which risked invalid YAML parsing.

Description

  • Replace gh pr checks --watch with an explicit polling loop that calls gh pr checks --json bucket,name,workflow and inspects check bucket values.
  • Add APPROVAL_WORKFLOW (set to github.workflow) and exclude that workflow from the wait logic, treat checks with bucket fail or cancel as blocking, and only wait while other checks are pending.
  • Replace the unindented heredoc for the approval comment with a printf-based construction so the run: | block remains valid YAML.

Testing

  • Parsed the workflow YAML with ruby -e 'require "psych"; Psych.load_file(".github/workflows/pr-auto-approve.yml"); puts "parsed"' and it succeeded.
  • Ran git diff --check to ensure no whitespace/syntax issues and it returned clean results.

Codex Task

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@eplus-bot

Copy link
Copy Markdown
Contributor

Thank you for creating this pull request and helping make the project better.

We will review / merge it when we are online.

@eplus-bot eplus-bot added needs-review Pull request is ready for maintainer review build-ci Build, CI, release, or project configuration labels Jul 3, 2026
@eplus-bot eplus-bot self-requested a review July 3, 2026 11:06
@deepsource-io

deepsource-io Bot commented Jul 3, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 0a1d8d9...c2b1f41 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Jul 3, 2026 11:18a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@hoangsvit hoangsvit merged commit f8cad61 into dev Jul 3, 2026
3 checks passed
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for helping make Gmail Alias Toolkit better!

@hoangsvit hoangsvit deleted the codex/kiem-tra-nguyen-nhan-bot-khong-approve-review branch July 3, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-ci Build, CI, release, or project configuration codex needs-review Pull request is ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants