Skip to content

feat: Auto-detect CI environment for output format #142

@Kilo59

Description

@Kilo59

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 github
  • GITLAB_CI=true -> --output-format gitlab

Environment Reference

GitHub Actions

GitHub naturally sets the following variables in a runner:

GitLab CI/CD

GitLab sets the following variables in a runner:

Technical Details

  • Update Arguments resolution in src/ruff_sync/cli.py to check for these environment variables when output_format is not explicitly provided.
  • Ensure that an explicit --output-format flag still takes precedence over auto-detection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions