{"id":15048290,"url":"https://github.com/github/chatops-templates","last_synced_at":"2025-10-04T08:31:18.925Z","repository":{"id":65974826,"uuid":"287260955","full_name":"github/chatops-templates","owner":"github","description":null,"archived":true,"fork":false,"pushed_at":"2021-03-18T16:10:06.000Z","size":29,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-09-29T00:21:25.492Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Handlebars","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null}},"created_at":"2020-08-13T11:27:08.000Z","updated_at":"2024-07-31T03:16:47.000Z","dependencies_parsed_at":"2023-02-19T18:01:14.671Z","dependency_job_id":null,"html_url":"https://github.com/github/chatops-templates","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fchatops-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fchatops-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fchatops-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fchatops-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/chatops-templates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235232487,"owners_count":18957057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T21:10:22.074Z","updated_at":"2025-10-04T08:31:13.618Z","avatar_url":"https://github.com/github.png","language":"Handlebars","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dte-templates\n\nContains templates that can be used by [Dynamic-Template-Engine](https://github.com/github/Dynamic-Template-Engine) node module. This repository showcases how the templates are need to be structured for ensuring proper loading and rendering of the templates.\n\n# About\n\nThis repository houses templates utilized by Teams + Github integration code, moreover it showcases how templates can be used with [Dynamic-Template-Engine](https://github.com/github/Dynamic-Template-Engine) node module. \n\n# Table of contents\n\n- [How to use?](#how-to-use)\n- [Using a public repo vs local copy?](#using-a-public-repo-vs-local-copy)\n- [Understanding the TransformerConfig](#understanding-the-transformerConfig)\n- [Setup](#setup)\n\n## How to use?\n\nThe templates can be loaded by [Dynamic-Template-Engine](https://github.com/github/Dynamic-Template-Engine) node module at runtime from either the local copies of templates or from a public github repository. The only requirement for the repository and/or from the local version is to adhere to the pre defined template directory structure with a Transformer Config json file. \n\nThe structure of the template directory either the local or the cloud version should be as follows: \n\n```\n| -\u003e CardTemplate ------------\u003e [CLIENT_NAME] (currently only Teams supported) -------\u003e  [TEMPLATE_ENGINE_NAME] (ex. Liquid, HandleBars)  -------------\u003e Template files\n| -\u003e EventTemplate -----------\u003e [TEMPLATE_ENGINE_NAME] (ex. Liquid, HandleBars)  -------------\u003e Template files\n| -\u003e TransformerConfig.json (this should have all the template registered for successful loading by the engine. \n```\nAn example of the above structure: \n```\nCardTemplate ---\u003e Teams ---\u003e HandleBars ---\u003e Hello.handlebars \nEventTemplate ---\u003e Liquid ---\u003e World.liquid\n```\n\nMore Info of how to use the templates with [Dynamic-Template-Engine](https://github.com/github/Dynamic-Template-Engine) can be found [here](https://github.com/github/Dynamic-Template-Engine/tree/master#template-directory-structure)\n\n\u003e :warning: **NOTE**: The names of the folders are case sensitive\n\n## Using a public repo vs local copy?\n\nIf the templates you use are generic or do not contain any internal data then having those templates in a public repo allows you to share your templates with the world, helping get user contributions and suggestions. \nIf the templates being used have content you wish to keep private, then having the templates as a local copy is the recommended way.\n\n## Understanding the TransformerConfig\n\nThe TransformerConfig.json is the file that allows you to load different templates for different tasks. Following is an example TransformConfig.json\n```\n{\n  \"cardRenderer\":[\n    {\n      \"SourceType\": \"IssueOpened\", // Source type can be any string \n      \"ClientType\": \"Teams\", // Has to be an ClientType value currently only Teams is supported\n      \"TemplateType\": \"HandleBars\", // Has to be TemplateType enum value, currently HandleBars and Liquid are the two supported \n      \"TemplateName\": \"issue_opened.handlebars\" // name of the template file \n    },\n    {\n      \"SourceType\": \"IssueReopened\",\n      \"ClientType\": \"Teams\",\n      \"TemplateType\": \"HandleBars\",\n      \"TemplateName\": \"issue_reopened.handlebars\"\n    }\n  ],\n  \"partials\":[],\n  \"eventTransformer\":[\n    {\n      \"SourceType\":\"IssueOpened\",// Source type can be any string\n      \"TemplateType\":\"HandleBars\",// Has to be TemplateType enum value, currently HandleBars and Liquid are the two supported \n      \"TemplateName\":\"issue_opened.handlebars\" // name of the template file \n    }\n  ]\n}\n```\n\n## Setup\n\nFor setting up the dynamic-template-engine to work with a repo follow the [setup instructions of dynamic-template-engine](https://github.com/github/Dynamic-Template-Engine#setup)\n\n## Contributing\nWant to help improve the integration between GitHub and Slack? Check out the [contributing docs](CONTRIBUTING.md) to get involved.\n\n## Code of Conduct\n\nSee [our code of conduct](CODE_OF_CONDUCT.md).\n\n## License\nThe project is available as open source under the terms of the [MIT License](LICENSE).\n\nWhen using the GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos).\n\n## Maintainer Contact \n\nTo reach out the the maintainers use [mail](mailto:opensource+github/dte-templates@github.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fchatops-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fchatops-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fchatops-templates/lists"}