ci: delete GitHub environment upon PR preview cleanup#28
Conversation
Currently, the `preview-cleanup.yml` workflow sets the GitHub deployment to 'inactive' when a PR is closed. This causes preview environments (e.g., `pr-123`) to accumulate indefinitely in the repository's environments settings page. This commit updates the GitHub Action script to explicitly delete the environment using `github.rest.repos.deleteAnEnvironment`. Deleting the environment automatically handles the deployment statuses associated with it. The `try...catch` block was removed so that any errors directly fail the action step, per requirements. Co-authored-by: MrOrz <108608+MrOrz@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
🤖 Hi @MrOrz, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
|
🤖 I'm sorry @MrOrz, but I was unable to process your request. Please see the logs for more details. |
Currently, the `preview-cleanup.yml` workflow sets the GitHub deployment to 'inactive' when a PR is closed. This causes preview environments (e.g., `pr-123`) to accumulate indefinitely in the repository's environments settings page. This commit updates the GitHub Action script to explicitly delete the environment using `github.rest.repos.deleteAnEnvironment`. Deleting the environment automatically handles the deployment statuses associated with it. The `try...catch` block was removed so that any errors directly fail the action step, per requirements. Co-authored-by: MrOrz <108608+MrOrz@users.noreply.github.com>
|
@claude review |
|
Claude finished @MrOrz's task in 1m 46s —— View job PR ReviewTasks
Review SummaryThis PR successfully simplifies the cleanup workflow and addresses the stated goal of preventing environment accumulation. The changes are sound overall, with one consideration for error handling. What ChangedBefore: The workflow iterated through all deployments in the environment and marked each as 'inactive', wrapped in a try-catch that silently logged errors. After: The workflow directly deletes the GitHub environment using Code reduction: ~18 lines → ~7 lines (much cleaner!) Analysis✅ Strengths
|
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
Currently, the
.github/workflows/preview-cleanup.ymlworkflow sets the GitHub deployment to 'inactive' when a PR is closed. This causes preview environments (e.g.,pr-123) to accumulate indefinitely in the repository's environments settings page.This updates the GitHub Action script to explicitly delete the environment using
github.rest.repos.deleteAnEnvironment. Deleting the environment automatically cleans up the repository settings. Thetry...catchblock was removed so that any errors directly fail the action step, as requested.PR created automatically by Jules for task 392506522579631310 started by @MrOrz