mirror of
https://github.com/webiny/action-conventional-commits.git
synced 2024-11-10 12:09:34 +01:00
feat: create action-conventional-commits
This commit is contained in:
parent
5b93994f80
commit
a2cbc10810
2 changed files with 31 additions and 24 deletions
39
dist/main/index.js
vendored
39
dist/main/index.js
vendored
|
@ -24671,33 +24671,36 @@ const { GitHub, context } = __webpack_require__(469);
|
||||||
(() => __awaiter(this, void 0, void 0, function* () {
|
(() => __awaiter(this, void 0, void 0, function* () {
|
||||||
const core = __webpack_require__(470);
|
const core = __webpack_require__(470);
|
||||||
const exec = __webpack_require__(986);
|
const exec = __webpack_require__(986);
|
||||||
console.log('context', context);
|
console.log('woaaah');
|
||||||
|
console.log("context", JSON.stringify(context.commits));
|
||||||
|
console.log('CEOOO KONTEKAST');
|
||||||
|
console.log("context", JSON.stringify(context));
|
||||||
return;
|
return;
|
||||||
// 1. Extract a list of users from received commits.
|
// 1. Extract a list of users from received commits.
|
||||||
/* const token = process.env.GH_TOKEN;
|
/* const token = process.env.GH_TOKEN;
|
||||||
|
|
||||||
const client = new GitHub(token, {});
|
const client = new GitHub(token, {});
|
||||||
const result = await client.({
|
const result = await client.({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
commit_sha: context.sha,
|
commit_sha: context.sha,
|
||||||
});
|
});
|
||||||
|
|
||||||
const pr = result.data.length > 0 && result.data[0];
|
const pr = result.data.length > 0 && result.data[0];
|
||||||
|
|
||||||
core.setOutput('pr', pr && pr.number || '');
|
core.setOutput('pr', pr && pr.number || '');
|
||||||
core.setOutput('number', pr && pr.number || '');
|
core.setOutput('number', pr && pr.number || '');
|
||||||
core.setOutput('title', pr && pr.title || '');
|
core.setOutput('title', pr && pr.title || '');
|
||||||
core.setOutput('body', pr && pr.body || '');
|
core.setOutput('body', pr && pr.body || '');
|
||||||
|
|
||||||
|
|
||||||
// 2. Add them to the list.
|
// 2. Add them to the list.
|
||||||
const contreebutors = new Contreebutors();
|
const contreebutors = new Contreebutors();
|
||||||
|
|
||||||
for (let i = 0; i < users.length; i++) {
|
for (let i = 0; i < users.length; i++) {
|
||||||
let user = users[i];
|
let user = users[i];
|
||||||
await contreebutors.add(user);
|
await contreebutors.add(user);
|
||||||
}*/
|
}*/
|
||||||
// 3. Commit changes done on the `contreebutors.json` and `README.md` file.
|
// 3. Commit changes done on the `contreebutors.json` and `README.md` file.
|
||||||
// 4. Add comment to the merged PR - notify the user that he was added to the contributors list.
|
// 4. Add comment to the merged PR - notify the user that he was added to the contributors list.
|
||||||
}))();
|
}))();
|
||||||
|
|
4
main.ts
4
main.ts
|
@ -4,8 +4,12 @@ const { GitHub, context } = require("@actions/github");
|
||||||
const core = require("@actions/core");
|
const core = require("@actions/core");
|
||||||
const exec = require("@actions/exec");
|
const exec = require("@actions/exec");
|
||||||
|
|
||||||
|
console.log('woaaah')
|
||||||
console.log("context", JSON.stringify(context.commits));
|
console.log("context", JSON.stringify(context.commits));
|
||||||
|
|
||||||
|
console.log('CEOOO KONTEKAST')
|
||||||
|
console.log("context", JSON.stringify(context));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
// 1. Extract a list of users from received commits.
|
// 1. Extract a list of users from received commits.
|
||||||
/* const token = process.env.GH_TOKEN;
|
/* const token = process.env.GH_TOKEN;
|
||||||
|
|
Loading…
Reference in a new issue