Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Expose Flags/Vars to Templating #20

Open
metmac opened this issue Aug 4, 2020 · 0 comments
Open

Feature Request: Expose Flags/Vars to Templating #20

metmac opened this issue Aug 4, 2020 · 0 comments

Comments

@metmac
Copy link

metmac commented Aug 4, 2020

It would be quite neat if we could call the other global vars defined in the main.go when writing our Go templates.
Perhaps in turn call our comment data type explicitly. (i.e. {{.comment}}
token,owner,repo,commentType,sha,number,file,position,templ,format,comment,deleteCommentRegex,baseURL,uploadURL

Example Template:

## Things Deployed to Platform in #{{.number}}
This is a test of the emergency broadcast system, this is only a test.

#A Header about the things we are deploying
{{.comment}} - `A body that is generated in via bash`

If I am reading func formatComment(comment string) (string, error) correct, presently it passes comment to the formatter explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant