我想知道是否有一种方法可以将gitlab与confluence连接起来,并在每次有东西被推入Gitlab项目时使用管道confluence进行更新。
发布于 2018-08-23 17:22:11
您需要使用Atlassian Marketplace中的附加组件或使用Confluence REST API来开发您自己的脚本。
Marketplace中提供的附加组件可以开箱即用,但当然你不能灵活地更改它们。您自己的脚本具有灵活性的优势。
根据你想要达到的目的,它可能有不同的方法,但基于你提到的,如果你想更新一个现有的页面,你可以调用Confluence REST API来更新现有的页面,并做你想要的更改。例如,在Confluence中更新现有页面:
curl -u admin:admin -X PUT -H 'Content-Type: application/json' -d'{"id":"3604482","type":"page",
"title":"new page","space":{"key":"TST"},"body":{"storage":{"value":
"<p>This is the updated text for the new page</p>","representation":"storage"}},
"version":{"number":2}}' http://localhost:8080/confluence/rest/api/content/3604482 | python -mjso看看Atlassian Marketplace的附加组件,还有Confluence REST API Examples了解更多详细信息。
https://stackoverflow.com/questions/51968010
复制相似问题