合并作业完成后如何通知Github?

时间:2018-09-30 06:12:24

标签: jenkins github jenkins-cli

在我的后期制作操作中,我有此设置,并且我的Jenkins日志显示它正在设置状态:

enter image description here

[Set GitHub commit status (universal)] PENDING on repos [GHRepository@131f061[description=<null>,homepage=<null>,name=trailheadOrgNew,license=<null>,fork=false,size=9381,milestones={},language=Apex,commits={},source=<null>,parent=<null>,responseHeaderFields={null=[HTTP/1.1 200 OK], Access-Control-Allow-Origin=[*], Access-Control-Expose-Headers=[ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval], Cache-Control=[private, max-age=60, s-maxage=60], Content-Encoding=[gzip], Content-Security-Policy=[default-src 'none'], Content-Type=[application/json; charset=utf-8], Date=[Sun, 30 Sep 2018 06:00:05 GMT], ETag=[W/"a25e48db034facf3571c55174cd56bfc"], Last-Modified=[Sat, 29 Sep 2018 18:38:46 GMT], OkHttp-Received-Millis=[1538287205593], OkHttp-Response-Source=[NETWORK 200], OkHttp-Selected-Protocol=[http/1.1], OkHttp-Sent-Millis=[1538287205325], Referrer-Policy=[origin-when-cross-origin, strict-origin-when-cross-origin], Server=[GitHub.com], Status=[200 OK], Strict-Transport-Security=[max-age=31536000; includeSubdomains; preload], Transfer-Encoding=[chunked], Vary=[Accept, Authorization, Cookie, X-GitHub-OTP], X-Accepted-OAuth-Scopes=[repo], X-Content-Type-Options=[nosniff], X-Frame-Options=[deny], X-GitHub-Media-Type=[github.v3; format=json], X-GitHub-Request-Id=[15D3:58C4:C7FE3D:1E98C90:5BB06665], X-OAuth-Scopes=[admin:repo_hook, repo, repo:status], X-RateLimit-Limit=[5000], X-RateLimit-Remaining=[4972], X-RateLimit-Reset=[1538289303], X-Runtime-rack=[0.043943], X-XSS-Protection=[1; mode=block]},url=https://api.github.com/repos/Nagendra080389/trailheadOrgNew,id=150819537]] (sha:459241d) with context:Mergejob
Setting commit status on GitHub for https://github.com/Nagendra080389/trailheadOrgNew/commit/459241d8175a54b70cf61c980ddfe150b04ed3e8
[WS-CLEANUP] Deleting project workspace...[WS-CLEANUP] done
Finished: SUCCESS

但是合并发生后,我看不到任何合并状态: 您在图像中看到的check passed来自Validation(PR的创建),而不是Jenkins中合并作业生成后的状态。

enter image description here

我要设置的状态是像合并作业失败还是从Jenkins传递过来?

1 个答案:

答案 0 :(得分:0)

在谷歌搜索后发现一个完美的答案。

https://stackoverflow.com/a/51003334/9175937