cloudposse / cloudposse/github-commenter
Feature Request: Expose Flags/Vars to Templating
- Ngôn ngữ chính
- Go
- Star
- 112
- Fork
- 17
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Hướng nghiên cứu
Start in main.go and trace func formatComment(comment string) (string, error) to see how the Go template is currently given comment data. Check how the listed globals are defined and passed into formatting. Done means templates can access the requested vars, including comment data, and the example template renders as intended.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github, go
- Lĩnh vực
- cli
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100