Comments (6)
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.
from automation.
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 {
const PR_ID = location.pathname.replace(/.+\/pull\/(\d+).*/, '$1');
if (confirm(`Create CI for #${PR_ID} ("${document.title}")?`)) {
await navigator.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.
from automation.
The way @vsemozhetbyt suggested could be easily done in node-review and it's a perfect place for it.
from automation.
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]]
get sourceURL() {
const { params } = this;
if (params.PR_ID) { // from a node-test-pull-request build
const owner = params.TARGET_GITHUB_ORG;
const repo = params.TARGET_REPO_NAME;
const prid = params.PR_ID;
return `https://github.com/${owner}/${repo}/pull/${prid}/`;
}
if (params.GITHUB_ORG) { // from a node-test-commit build
const owner = params.GITHUB_ORG;
const repo = params.REPO_NAME;
const prm = params.GIT_REMOTE_REF.match(/refs\/pull\/(\d+)\/head/);
if (prm) {
return `https://github.com/${owner}/${repo}/pull/${prm[1]}/`;
} else {
const result =
`https://api.github.com/repos/${owner}/${repo}/git/` +
params.GIT_REMOTE_REF;
return result;
}
}
}
from automation.
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.
from automation.
Unarchived this repo so I could close all the PRs and issues. Will re-archive when I'm done.
from automation.
Related Issues (20)
- Should Automation take ownership of make-node-meeting? HOT 6
- What about a related project for @nodejs/automation projects utils? HOT 19
- Proposing to form a monorepo HOT 14
- Can we automate appending changelogs to a release HOT 3
- Side effect: Working with Build WG to change description on Nodejs.org ? HOT 9
- CitGM testing Node-Core-Utils? HOT 10
- Include collaborators/team members in the README? HOT 8
- Idea: A twitter bot to thank new contributors HOT 4
- An app for managing bans HOT 8
- greenkeeper-like feature for ncu-team HOT 5
- Use ncu-team in create-node-meeting-artifacts HOT 1
- Tool for generating/maintaining/auditing CODEOWNER file HOT 12
- doc REPLACEME linter/fixer HOT 3
- Commit Queue HOT 8
- explore k8s prow as a way to automate stuff in github HOT 4
- Github team management (reply here if you want to join) HOT 33
- Node.js clone repo for testing HOT 6
- Brigade HOT 3
- Repo and npm accesses of related projects HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from automation.