RedHatProductSecurity / trestle-bot

A workflow automation tool for `compliance-trestle`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add configuration to provide Git provider information in addition to detecting it from the environment.

jpower432 opened this issue · comments

Is your feature request related to a problem? Please describe.
Adding configuration to allow the Git information to by supplied would simplify running this in different contexts. The information is currently detected with pre-defined environment variables.

Describe the solution you'd like
Add an option to provide this information in a configuration file, flags, or environment variables.
To keep this backward compatible, if the custom information is not supplied, fall back to auto-detection (pre-defined environment variables).

Describe alternatives you've considered
User can just set the expected variables for the Git provider they choose. This is the current workaround, but could eventually result in unexpected behavior.

Additional context
The goal is to provide ready-made workflows/jobs for GitHub Actions and GitLab CI (#134), but makes the solution more flexible with other CI/CD systems or in more contexts (i.e. Kubernetes jobs)

Adding some information on considerations around how this information is specified for this use case:

Considerations for different options

Add Flags
This information is mostly going to be relatively static and there are already a lot of flag options
Flags with environment variable defaults seem to be a good option

Environment Variables
The information is currently be evaluated from environment variables for that would create some uniformity
Probably the least about of code to complete and the most straightforward in CI

Configuration file support

  • There are some other values passed in flag that might benefit from a config file (e.g markdown path and oscal model type)
  • Requires additional management outside of the the workflow files which could lead to confusion about what to set where