cloudposse / cloudposse/github-commenter
Feature Request: Expose Flags/Vars to Templating
- Langage dominant
- Go
- Étoiles
- 112
- Forks
- 17
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez dans main.go et suivez func formatComment(comment string) (string, error) pour voir comment les données du commentaire sont actuellement transmises au modèle Go. Vérifiez comment les globals listés sont définis et transmis au formatage. La tâche est terminée lorsque les modèles peuvent accéder aux vars demandées, y compris les données du commentaire, et que le modèle d’exemple est rendu comme prévu.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- github, go
- Domaine
- cli
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100