Skip to content

Optimize auto-close-pr and codeql workflow files#10

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/optimize-workflow-files
Draft

Optimize auto-close-pr and codeql workflow files#10
Copilot wants to merge 2 commits intomainfrom
copilot/optimize-workflow-files

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 25, 2026

Adds configurable retry/backoff, conditional logging, and expanded tracing to the two workflow files to improve efficiency, maintainability, and run-level traceability.

auto-close-pr.yml

  • Configurable retries: Top-level env vars MAX_RETRIES: 3 / BACKOFF_SECONDS: 5 drive a retry loop in the close step; fails cleanly after all attempts are exhausted
  • Conditional logging: New step runs only for same-repo PRs (the no-op path) to surface a clear skip message instead of silent skips

codeql.yml

  • Run context logging: First step prints run_id, sha, ref, and language — makes individual matrix legs trivially identifiable in logs
  • Selective build gate: Tightened xcodebuild step condition to skip on PRs not targeting main, preventing unnecessary macOS runner consumption
Original prompt

This task involves optimizing two workflow files: .github/workflows/auto-close-pr.yml and .github/workflows/codeql.yml. Based on the review:

Changes for .github/workflows/auto-close-pr.yml:

  1. Configurable Retries: Introduce environment variables for MAX_RETRIES and BACKOFF_SECONDS to make the retry and backoff configurations more flexible.
  2. Conditional Logging: Add if conditions to skip logging PR details for non-relevant PRs, reducing unnecessary output.

Changes for .github/workflows/codeql.yml:

  1. Expanded Logging Context: Include additional context like commit SHA or workflow ID in the logging step to better distinguish runs.
  2. Resource Optimization: Evaluate conditions to limit unnecessary steps (e.g., selective build modes or branch-type checks) to save action minutes.

These updates aim to enhance efficiency, maintainability, and traceability of the workflows. Add these optimizations while maintaining existing workflow logic.

This pull request was created from Copilot chat.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: marilene38 <135267736+marilene38@users.noreply.github.com>
Copilot AI changed the title [WIP] Optimize workflow files for better efficiency and logging Optimize auto-close-pr and codeql workflow files Feb 25, 2026
Copilot AI requested a review from marilene38 February 25, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants