【问题标题】:YouTrack workflow - HTTP requestYouTrack 工作流程 - HTTP 请求
【发布时间】:2018-02-07 23:05:21
【问题描述】:

是否可以在 YouTrack 工作流程中执行 HTTP 请求?

我想创建一个工作流,只要用户在某个问题上记录一段时间,它就会调用一些 REST API。

【问题讨论】:

    标签: youtrack


    【解决方案1】:

    YouTrack 工作流程规则在非常受限的沙箱中运行。目前,没有办法做你想做的事。

    【讨论】:

    【解决方案2】:

    YouTrack 工作流提供了一些与外部服务器通信的方法:

    https://www.jetbrains.com/help/youtrack/standalone/2017.1/Workflow-REST-API.html

    一个简单的例子(取自上面的链接):

    // post new issue content to third-party tool and add response as a comment
    
    when issue.becomesReported() {
        addHttpHeader("Content-Type", "text/html");
        var response = doHttpPost("http://server.com/issueRegistry", issue.description);
        issue.addComment(response)
    }
    

    我从未在 YouTrack 中使用过时间跟踪,因此这里没有具体示例。但是在上面链接的页面上,有一个“使用 Harvest Web 服务进行自定义时间跟踪”的部分,也许你可以从那里调整一些代码。

    【讨论】:

      猜你喜欢
      • 2019-01-14
      • 1970-01-01
      • 2013-11-04
      • 2020-09-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-22
      相关资源
      最近更新 更多