Skip to content

Conversation

@danielibarrola
Copy link

Summary

This PR introduces the ability to pass custom environment variables to GitHub Action workflows triggered by the Culprit Finder. This is particularly useful for workflows that require specific configurations to run successfully during the bisection process.

Changes

  • CLI Enhancement: Added a new --env argument to the culprit-finder command. It accepts multiple KEY=VALUE pairs.
  • Environment Variable Parsing: Implemented a helper function _parse_env_vars in cli.py to convert CLI input into a dictionary.
  • Workflow Integration: Updated CulpritFinder to accept env_vars. These variables are serialized into a compact JSON string and passed to the workflow via the json_vars input.
  • Testing:
    • Added unit tests in test_cli.py to verify correct parsing of the --env flag.
    • Added unit tests in test_culprit_finder.py to ensure json_vars are correctly formatted and passed to the GitHub client.
  • Documentation: Updated the README.md with usage for the new --env flag.

Example Usage

culprit-finder \
  --repo owner/repo \
  --start a1b2c3d \
  --end e5f6g7h \
  --workflow build.yml \
  --env DEBUG=true TIMEOUT=60

@danielibarrola danielibarrola force-pushed the feature/culprit-finder-workflow-env-variables branch 2 times, most recently from 7e91ace to 71a5572 Compare December 30, 2025 17:37
@danielibarrola danielibarrola marked this pull request as ready for review December 30, 2025 17:39
@danielibarrola danielibarrola force-pushed the feature/culprit-finder-workflow-env-variables branch from 71a5572 to f1f2f65 Compare January 6, 2026 21:08
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.

1 participant