mirror of
https://github.com/webiny/action-conventional-commits.git
synced 2024-11-23 10:21:51 +01:00
feat: create action
This commit is contained in:
parent
7dc92a8ab6
commit
5739f6105c
2 changed files with 0 additions and 8 deletions
4
dist/main/index.js
vendored
4
dist/main/index.js
vendored
|
@ -27943,15 +27943,11 @@ 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 = get(context, "payload.pull_request.commits_url");
|
const prCommitsUrl = get(context, "payload.pull_request.commits_url");
|
||||||
console.log('ide check URL-a');
|
|
||||||
console.log('dobeoo PR URL', prCommitsUrl);
|
|
||||||
console.log(context.payload);
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
4
main.ts
4
main.ts
|
@ -18,16 +18,12 @@ 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 = get(context, "payload.pull_request.commits_url");
|
const prCommitsUrl = get(context, "payload.pull_request.commits_url");
|
||||||
console.log('ide check URL-a')
|
|
||||||
console.log('dobeoo PR URL', prCommitsUrl)
|
|
||||||
console.log(context.payload)
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue