feat: create action

This commit is contained in:
Adrian Smijulj 2020-06-11 09:39:18 +02:00
parent f92da1bbf8
commit f4d07e953c
2 changed files with 4 additions and 0 deletions

2
dist/main/index.js vendored
View file

@ -27943,11 +27943,13 @@ const extractCommits = () => __awaiter(this, void 0, void 0, function* () {
} }
// For PRs, we need to get a list of commits via the GH API: // For PRs, we need to get a list of commits via the GH API:
const prCommitsUrl = typeof get(context, "payload.pull_request.commits_url"); const prCommitsUrl = typeof get(context, "payload.pull_request.commits_url");
console.log('ide check URL-a');
if (prCommitsUrl) { if (prCommitsUrl) {
try { try {
const { body } = yield got.get(prCommitsUrl, { const { body } = yield got.get(prCommitsUrl, {
responseType: "json", responseType: "json",
}); });
console.log('dobeo vodyyyy', body);
if (Array.isArray(body)) { if (Array.isArray(body)) {
return body.map((item) => item.commit); return body.map((item) => item.commit);
} }

View file

@ -18,12 +18,14 @@ const extractCommits = async (): Promise<Commit[]> => {
// For PRs, we need to get a list of commits via the GH API: // For PRs, we need to get a list of commits via the GH API:
const prCommitsUrl = typeof get(context, "payload.pull_request.commits_url"); const prCommitsUrl = typeof get(context, "payload.pull_request.commits_url");
console.log('ide check URL-a')
if (prCommitsUrl) { if (prCommitsUrl) {
try { try {
const { body } = await got.get(prCommitsUrl, { const { body } = await got.get(prCommitsUrl, {
responseType: "json", responseType: "json",
}); });
console.log('dobeo vodyyyy', body)
if (Array.isArray(body)) { if (Array.isArray(body)) {
return body.map((item) => item.commit); return body.map((item) => item.commit);
} }