comvent icon indicating copy to clipboard operation
comvent copied to clipboard

[Feature Request]: Support GitHub Secret and Env variable retrieval from Comvent configuration file

Open shuzijun opened this issue 2 years ago • 5 comments

Enhancement Area

Comvent Configuration YAML

Details

Support ${{ secrets.some_key }} notation in keywords[*].value to pull in extra information from GitHub Secret or Env variable.

Example

version: 0.2.0

trigger: default

keywords:
  - name: some-abusive-content
    value: ${{secrets.key1}}
  - name: advertising
    value: ${{secrets.key2}}

shuzijun avatar Jul 24 '21 02:07 shuzijun

Hi @shuzijun, thanks for filing a feature request! Would you be able to elaborate what you want from the secret? Is it that you want to allow the use of GitHub repository secret for the keywords[*].value? If so, what do you think about providing a different key such as keywords[*].secretName?

rytswd avatar Jul 24 '21 18:07 rytswd

Sorry, I didn’t understand the question of the last sentence. The configuration I expect is for example:

version: 0.2.0

trigger: default

keywords:
  - name: some-abusive-content
    value: ${{secrets.key1}}
  - name: advertising
    value: ${{secrets.key2}}

shuzijun avatar Jul 26 '21 02:07 shuzijun

Thanks, I see what you mean now! I originally meant something like below:

version: 0.2.0

trigger: default

keywords:
  - name: some-abusive-content
    secretName: SOME_SECRET_FOR_ABUSIVE_CONTENT
  - name: advertising
    secretName: SOME_SECRET_FOR_ADVERTISING_CONTENT

The above approach I proposed is probably simpler to implement, but your suggestion is more GitHub Action-like 👍

rytswd avatar Jul 27 '21 16:07 rytswd

I have updated the title and description for better clarity. Please let me know if there should be some amendments.

rytswd avatar Jul 27 '21 16:07 rytswd

The description is very accurate, what I expected.:+1:

shuzijun avatar Jul 28 '21 01:07 shuzijun