Feature Request: Expose Flags/Vars to Templating
还没有人认领这个 Issue。
评估
调研方向
从 main.go 开始,跟踪 func formatComment(comment string) (string, error),了解当前如何向 Go template 提供评论数据。检查列出的 globals 是如何定义并传入格式化过程的。当模板可以访问所请求的 vars(包括评论数据),且示例模板按预期渲染时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Go
- 星标
- 112
- 派生
- 17
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudposse/github-commenter 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 20/100
cloudposse/github-commenter#137 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 45/100
cloudposse/github-commenter#96 · 3 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 5/5 一周以上 新手友好度 25/100
cloudposse/github-commenter#45 · 1 条评论 ·
-
Build amd64 version for Linux可能重新可做 @aknysh 于 1690 天前认领,目前没有进行中的 PR。 未关闭
cloudposse/github-commenter#36 · 2 条评论 · 已指派 1 人 ·
查看 cloudposse/github-commenter 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
evilmartians/lefthook#1588 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
kubernetes-sigs/kubebuilder#6084 ·
维护者通常 3 天内回复
-
agent-research-recommend agent-review-finding chore
难度 2/5 1-3 小时 新手友好度 78/100
jordansmall/spindrift#4821 · 1 条评论 ·
维护者通常 1 天内回复
-
area:web
难度 2/5 1-3 小时 新手友好度 82/100
praetorianer777/GoTome#178 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
oracle/go-oracledb#105 ·
维护者通常 1 天内回复