首页 > 解决方案 > 合并作业完成后如何通知 Github?

问题描述

在我的后期构建操作中,我进行了此设置,并且我的 Jenkins 日志显示它正在设置状态:

在此处输入图像描述

[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您在图像中看到的是来自验证(PR 的创建),而不是在 Jenkins 中构建合并作业后的状态。

在此处输入图像描述

我要设置的是获得一个状态,比如合并作业失败或从詹金斯传递过来?

标签: jenkinsgithubjenkins-cli

解决方案


推荐阅读