You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
As an awkward workaround till this is done properly, I can suggest a tiny bookmarklet with a new Google Chrome clipboard API (available since v66):
javascript: {(async()=>{try{constPR_ID=location.pathname.replace(/.+\/pull\/(\d+).*/,'$1');if(confirm(`Create CI for #${PR_ID} ("${document.title}")?`)){awaitnavigator.clipboard.writeText(PR_ID);open('https://ci.nodejs.org/job/node-test-pull-request/build?delay=0sec');}}catch(err){alert(err);}})();}
It asks if the PR is an intended one, copies its ID to the clipboard and opens CI form.
When the github bot was able to start citgm CI runs on request, it worked by collaborators posting a comment in the PR @-mentioning the bot which would then work out the correct parameters. It worked really well when it worked and would be a good long term solution.
have git node land check the CI parameters to make sure they match the PR number? (That's a big request and would probably be sloooooow.)
Not really, actually, unless the Jenkins is stucked for some reason. All you need is an additional request to the Jenkins API. In case anyone is interested, here is how you can figure out the PRID from a build (code copy-pasted from nodejs/node-core-utils#161, and from my experience using that PR to get the CI results (~3-5 req per PR failed by flakes) , the request is pretty fast if Jenkins is not stucked):
// request a build with the suffix api/json/?tree=actions[parameters[name,value]]// e.g. https://ci.nodejs.org/job/node-test-pull-request/13871/api/json?tree=actions[parameters[name,value]]// https://ci.nodejs.org/job/node-test-commit/17170/api/json?tree=actions[parameters[name,value]]getsourceURL(){const{ params }=this;if(params.PR_ID){// from a node-test-pull-request buildconstowner=params.TARGET_GITHUB_ORG;constrepo=params.TARGET_REPO_NAME;constprid=params.PR_ID;return`https://github.com/${owner}/${repo}/pull/${prid}/`;}if(params.GITHUB_ORG){// from a node-test-commit buildconstowner=params.GITHUB_ORG;constrepo=params.REPO_NAME;constprm=params.GIT_REMOTE_REF.match(/refs\/pull\/(\d+)\/head/);if(prm){return`https://github.com/${owner}/${repo}/pull/${prm[1]}/`;}else{constresult=`https://api.github.com/repos/${owner}/${repo}/git/`+params.GIT_REMOTE_REF;returnresult;}}}
When the github bot was able to start citgm CI runs on request, it worked by collaborators posting a comment in the PR @-mentioning the bot which would then work out the correct parameters. It worked really well when it worked and would be a good long term solution.
Most recently discussed in nodejs/build#1180, agreed that this is the best solution long-term.
I like the idea of git node metadata warning if the PR-URL doesn't match, given that it's already telling you whether CI was run or not.
Activity
vsemozhetbyt commentedon Mar 24, 2018
As an awkward workaround till this is done properly, I can suggest a tiny bookmarklet with a new Google Chrome clipboard API (available since v66):
It asks if the PR is an intended one, copies its ID to the clipboard and opens CI form.
priyank-p commentedon Mar 24, 2018
The way @vsemozhetbyt suggested could be easily done in node-review and it's a perfect place for it.
richardlau commentedon Mar 25, 2018
When the github bot was able to start citgm CI runs on request, it worked by collaborators posting a comment in the PR @-mentioning the bot which would then work out the correct parameters. It worked really well when it worked and would be a good long term solution.
joyeecheung commentedon Mar 26, 2018
Not really, actually, unless the Jenkins is stucked for some reason. All you need is an additional request to the Jenkins API. In case anyone is interested, here is how you can figure out the PRID from a build (code copy-pasted from nodejs/node-core-utils#161, and from my experience using that PR to get the CI results (~3-5 req per PR failed by flakes) , the request is pretty fast if Jenkins is not stucked):
gibfahn commentedon Mar 26, 2018
Most recently discussed in nodejs/build#1180, agreed that this is the best solution long-term.
I like the idea of
git node metadatawarning if the PR-URL doesn't match, given that it's already telling you whether CI was run or not.Trott commentedon Apr 22, 2023
Unarchived this repo so I could close all the PRs and issues. Will re-archive when I'm done.