github-action icon indicating copy to clipboard operation
github-action copied to clipboard

Path to the CLA.md cannot be used as variable in custom custom-notsigned-prcomment

Open simonmeggle opened this issue 2 years ago • 1 comments

Describe the bug It is not possible to link to the CLA document if you use a custom custom-notsigned-prcomment in cla.yml.

To Reproduce Add this line to cla.yml:

custom-notsigned-prcomment: '<br/>Thank you for your Pull Request, we really appreciate it!<br/>We kindly ask that you to sign our [Contributor License Agreement](${input.getPathToDocument()}) before....  ... .... '

But obviously, getPathToDocument cannot be called within a custom message.

Expected behavior I expect to see the Hyperlink to the documentation.

=> How can I use a custom custom-notsigned-prcomment and still insert the CLA link dynamically?

simonmeggle avatar Aug 25 '22 15:08 simonmeggle

edit: Sorry for the necro. Didn't check the dates.

Hey,

we got this working by turning it into an environment variable. The following works for us:

env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  [...]
  PATH_TO_CLA: 'https://github.com/.../.../main/CLA.md'
with:
  path-to-signatures: [...]
  path-to-document: $PATH_TO_CLA
  [...]
  custom-notsigned-prcomment: >
      Like many open-source projects we ask that you sign our [Contributor License Agreement]($PATH_TO_CLA) before we can accept your contribution.
  [...]

ronald-jaepel avatar Jun 24 '24 19:06 ronald-jaepel