TeamCity renderer
還沒有人認領這個 Issue。
評估
研究方向
先檢查現有的 renderer 和 CLI 輸出路徑,然後閱讀連結的 TeamCity service-message 文件。定義從程式碼中使用 renderer 以及 CLI 輸出的運作方式,包括 severity 和 escaping 要求。當能夠產生、轉換或將有效的 TeamCity inspection messages 寫入 stdout 時,即視為完成。
由索引模型根據 Issue 內容生成。
描述
It would be nice if there were a built-in TeamCity renderer, that can render TeamCity service messages, like for example
##teamcity[inspectionType category='openapi-diff' id='new-endpoint' name='New Endpoint' description='info -- New Endpoint']
##teamcity[inspection typeId='new-endpoint' file='build\openapi.json' message='info -- New Endpoint GET /showcase/v1/open/{id} - Query something totally open' SEVERITY='INFO']
##teamcity[inspection typeId='new-endpoint' file='build\openapi.json' message='info -- New Endpoint GET /showcase/v1/open/{open-id}/samples/{sample-id}/sub-samples/{sub-sample-id} - Query something else totally open' SEVERITY='INFO']
##teamcity[inspectionType category='openapi-diff' id='deleted-endpoint' name='Deleted Endpoint' description='error -- Deleted Endpoint']
##teamcity[inspection typeId='deleted-endpoint' file='build\openapi.json' message='error -- Deleted Endpoint GET /showcase/v1/whatever - Get whatever' SEVERITY='ERROR']
##teamcity[inspection typeId='deleted-endpoint' file='build\openapi.json' message='error -- Deleted Endpoint GET /showcase/v2/whatever - Get whatever else' SEVERITY='ERROR']
##teamcity[inspectionType category='openapi-diff' id='changed-operation' name='Changed Operation' description='Changed Operation']
##teamcity[inspection typeId='changed-operation' file='build\openapi.json' message='info -- Non-breakingly changed operation GET /showcase/v1/foo' SEVERITY='INFO']
##teamcity[inspection typeId='changed-operation' file='build\openapi.json' message='error -- Breakingly changed operation POST /showcase/v1/bar' SEVERITY='ERROR']
##teamcity[inspection typeId='changed-operation' file='build\openapi.json' message='error -- Breakingly changed operation POST /showcase/v1/bar/{bar-id}/baz/{baz-id}/boo' SEVERITY='ERROR']
In the CLI if enabled (or if TeamCity detected) this renderer should write to stdout.
When using via code, it should be a renderer like the others so that it can also be transformered or processed as necessary (like having one Gradle task that has it as output file and another that writes it to stdout so that the generation can be cached while the service messages will still be printed and thus processed).
The inspections can of course also be more fine-grained like for each specific change.
Or having more extensive messages which also support HTML (see linked docs).
Two things to keep in mind:
- While the docs list
SEVERITYas custom attribute it should still be used as TeamCity indeed considers it to differentiate between error and non-errors - Texts that could contain some special characters need a special escaping like this one:
// | => || must be handled first. or we will // escape the previously added escape character text .replace("|", "||") .replace("'", "|'") .replace("\n", "|n") .replace("\r", "|r") .replace("[", "|[") .replace("]", "|]")
- 主要語言
- Java
- 星號
- 1.1k
- 分支
- 190
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
OpenAPITools/openapi-diff 的其他 Issue
-
enhancement
難度 2/5 1-3 小時 新手友好度 68/100
OpenAPITools/openapi-diff#506 ·
-
good first issue help wanted
難度 2/5 1-3 小時 新手友好度 68/100
OpenAPITools/openapi-diff#364 ·
-
bug OpenAP 3.1.0 Support
難度 3/5 1-2 天 新手友好度 68/100
OpenAPITools/openapi-diff#910 · 1 則留言 ·
-
Render capabilities
難度 3/5 1-2 天 新手友好度 55/100
OpenAPITools/openapi-diff#893 · 1 則留言 ·
-
Breaking/Non-Breaking classification
難度 3/5 1-2 天 新手友好度 55/100
OpenAPITools/openapi-diff#886 ·
查看 OpenAPITools/openapi-diff 的全部 Issue
相似的 Issue
-
documentation
難度 2/5 1-3 小時 新手友好度 65/100
inu-appcenter/memorIN-backend#288 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
-
frontend maui-pilot pilot-ask question
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
-
area/plugin
難度 2/5 1-3 小時 新手友好度 75/100
kestra-io/plugin-kestra#190 ·