-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Auto label failed preview deploys #10051
Fix: Auto label failed preview deploys #10051
Conversation
WalkthroughThe pull request modifies the GitHub Actions workflow configuration for labeling failed preview deploys. The change involves updating the parameter format in the Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/label-deploy-failed.yml (1)
40-40
: Inconsistent label parameter format between add and remove operations.While the change to use
name
parameter inremoveLabel
is correct according to the GitHub REST API, theaddLabels
operation on line 25 still uses the array format. For consistency and maintainability, consider using the newer GitHub REST API endpoints for both operations.github.rest.issues.addLabels({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - labels: ["Deploy-Failed"] + labels: ["Deploy-Failed"] // Consider using github.rest.issues.addLabel with name parameter instead })
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/label-deploy-failed.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: CodeQL-Build
- GitHub Check: cypress-run (1)
🔇 Additional comments (1)
.github/workflows/label-deploy-failed.yml (1)
40-40
: Verify the GitHub REST API format change.Let's confirm that the new format using
name
parameter is the correct approach according to GitHub's API documentation.✅ Verification successful
GitHub REST API format is correct and working ✅
The
name
parameter is the correct format according to GitHub's API, and recent workflow runs confirm it's working properly.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct GitHub REST API format for removing labels # Expected results: Documentation showing that 'name' parameter is the correct format # Check the GitHub REST API documentation for removing a label gh api \ -H "Accept: application/vnd.github.v3+json" \ /repos/ohcnetwork/care_fe/issues/10051 \ --jq '.url' | xargs curl -s | jq '.labels' # List recent workflow runs to check if the new format is working gh run list --workflow=label-deploy-failed.yml --limit 5 --json conclusion,event,statusLength of output: 855
I added the label on purpose by commenting "Deploy Preview failed" |
Proposed Changes
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit