-
Notifications
You must be signed in to change notification settings - Fork 5
feat: Auto-detect CI environment for output format #142
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
Add auto-detection of CI environments to ruff-sync so that it defaults to the appropriate output format without requiring manual flags.
Proposed Mapping
GITHUB_ACTIONS=true->--output-format githubGITLAB_CI=true->--output-format gitlab
Environment Reference
GitHub Actions
GitHub naturally sets the following variables in a runner:
GITHUB_ACTIONS: Always set totruewhen GitHub Actions is running the workflow.- GitHub Documentation: Default environment variables
GitLab CI/CD
GitLab sets the following variables in a runner:
GITLAB_CI: Always set totruefor all jobs executed by GitLab CI/CD.- GitLab Documentation: Predefined variables
Technical Details
- Update
Argumentsresolution insrc/ruff_sync/cli.pyto check for these environment variables whenoutput_formatis not explicitly provided. - Ensure that an explicit
--output-formatflag still takes precedence over auto-detection.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request