refact: factorized the workflow waiting loops as a gh action#44
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #44 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 8 8
=========================================
Hits 8 8 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Pull request overview
This PR refactors workflow waiting loops by replacing inline shell scripts with a reusable GitHub Action (go-openapi/gh-actions/ci-jobs/wait-pending-jobs). The goal is to improve code maintainability by eliminating duplicated logic across workflows.
Key changes:
- Replaced ~40 lines of bash script per workflow with a single action reference
- Consolidated workflow run waiting logic into a shared GitHub Action
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
.github/workflows/contributors.yml |
Replaced inline waiting script with reusable action, removed environment variables |
.github/workflows/auto-merge.yml |
Replaced inline waiting script with reusable action, removed environment variables |
Critical Issues Found: The refactoring inadvertently removed necessary environment variables (GH_TOKEN and PR_URL) that are still required by other steps in both workflows. Additionally, in contributors.yml, the action is being passed an incorrect PR URL context that won't work with workflow_call triggers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2cfa11e to
f310f0b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
f310f0b to
54f65b0
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| PR_URL: ${{github.event.pull_request.html_url}} | ||
| GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
There was a problem hiding this comment.
There's inconsistent spacing in the GitHub Actions expressions. Lines 21-22 use ${{ without a space after the opening braces, while the action parameters at lines 67-68 use ${{ with spaces. For consistency and readability, consider using consistent spacing throughout (e.g., ${{ github.event.pull_request.html_url }} and ${{ secrets.GITHUB_TOKEN }}).
There was a problem hiding this comment.
ok forthcoming PR following up
Change type
Please select: 🆕 New feature or enhancement|🔧 Bug fix'|📃 Documentation update
Short description
Fixes
Full description
Checklist