如何将工件从 GitLab 发送到 Teams

How to send artifact from GitLab to Teams

我想使用 --curl 将工件从 GitLab 发送到 Microsoft Team,有人知道我该怎么做吗? 主要思想是使用 curl 命令将文件作为附件发送到 Teams。

N.B。 I know how to send a text,还需要发附件。

我认为不可能将 -actual- 文件附加到 Teams 消息,而是可以 link 附加到位于其他地方的文件,特别是在团队的 SharePoint 站点中本身,例如。所以,你会,例如:

  1. 用于将文件上传到团队的 SharePoint 站点的用户图(基本上是团队中的“文件”选项卡)
  2. 使用 Graph 发送 Teams 消息,引用附件。这是一个例子:

https://docs.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http#example-4-send-a-message-with-file-attachment-in-it