CircleCI-Public / circleci-cli

Use CircleCI from the command line
https://circleci-public.github.io/circleci-cli/
MIT License
404 stars 233 forks source link

[SNC-387] In policy decide, compile config only when context is config #983

Closed sagar-connect closed 11 months ago

sagar-connect commented 11 months ago

Jira: SNC-387

Checklist

=========

Internal Checklist

Changes

=======

Rationale

=========

The policy feature could be used non CircleCI-config related areas as well in the future. But, the compilation is relevant to circleci configs only.

Considerations

==============

It was understood that ownerid is not needed policy compilation, so that check is also removed.

Screenshots

============

Before

Image or gif

After

Image or gif where change can be clearly seen

Here are some helpful tips you can follow when submitting a pull request:

  1. Fork the repository and create your branch from main.
  2. Run make build in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (make test).
  5. The --debug flag is often helpful for debugging HTTP client requests and responses.
  6. Format your code with gofmt.
  7. Make sure your code lints (make lint). Note: This requires Docker to run inside a local job.