diggerhq / digger

Digger is an open source IaC orchestration tool. Digger allows you to run IaC in your existing CI pipeline ⚡️
https://digger.dev
Apache License 2.0
3.67k stars 178 forks source link

Add show-projects command to CommentOps #547

Closed toVersus closed 1 year ago

toVersus commented 1 year ago

It would be great to have a digger show-projects command to show all the impacted projects by the PR on the comment, and use that info to run other commands like digger plan -p <project_name> or digger apply -p <project_name> without looking at the digger.yaml file. We currently define a lot of projects in the digger.yaml file and cannot remember the relationship between dir and name of the project.

Something like this

digger.yaml:

projects:
- name: foo_develop
  dir: foo
  workflow: develop
- name: foo_staging
  dir: foo
  workflow: staging
- name: foo_product
  dir: foo
  workflow: product
- name: bar_develop
  dir: bar
  workflow: develop
- name: bar_staging
  dir: bar
  workflow: staging
- name: bar_product
  dir: bar
  workflow: product
- name: baz
  dir: baz
  workflow: default
...

GitHub comment output:

Following projects are impacted by pull request #999
- foo_develop
- foo_staging
- foo_product
- baz

If this feature request is acceptable, I will send the PR do the implementation. (WIP: https://github.com/toVersus/digger-lib-orchestrator/commit/10387e241c7c7ff28f4075b865c4c26229758120, https://github.com/toVersus/digger/commit/bf59142c84267f6b1a42efeeb357347d58d80245)

motatoes commented 1 year ago

Hey @toVersus thanks for filing this issue! It makes sense to me to have this command. I think this would be useful also when we are generating projects at runtime or as you mentioned having alot of projects in digger.yml

Please go ahead and create the pull requests for review 👍

toVersus commented 1 year ago

Thanks! I submitted the PRs to implement this feature.

motatoes commented 1 year ago

hey @toVersus thanks so much for the contribution - Would you be interested in further contributing to digger? We have a few issues that could use your help - if you are interested to discuss could you message me on slack please?

Thank you !!

https://join.slack.com/t/diggertalk/shared_invite/zt-1tocl4w0x-E3RkpPiK7zQkehl8O78g8Q