Skip to content

Commit

Permalink
πŸ’„ style: perfect info
Browse files Browse the repository at this point in the history
  • Loading branch information
xrkffgg committed Oct 29, 2021
1 parent 95ae392 commit 19e0dc6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

# Changelog

## v1.0.3

`2021.10.29`

- πŸ’„ style: perfect info.
## v1.0.2

`2021.10.29`
Expand Down
7 changes: 4 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9747,11 +9747,12 @@ function run() {
const extra = core.getInput('extra');
const ctx = github.context;
if (ctx.eventName.indexOf('pull_request') === -1) {
core.warning(`[AC] This Action is only support PR events.`);
core.warning(`[AC] πŸ›‘ This Action is only support PR events.`);
return;
}
const { owner, repo } = ctx.repo;
const { title, number, labels } = ctx.payload.pull_request;
core.info(`[AC] πŸ›Ž This PR number is [${number}].`);
let titleType = title.split(':')[0];
if (titleType.split('(').length > 0) {
titleType = titleType.split('(')[0];
Expand All @@ -9761,7 +9762,7 @@ function run() {
if (enumInput) {
const enumArr = (0, actions_util_1.dealStringToArr)(enumInput);
if (enumArr.indexOf(titleType) === -1) {
core.warning(`[AC] This PR type: ${titleType} is not in list to deal.`);
core.warning(`[AC] πŸ›‘ This PR type: ${titleType} is not in list to deal.`);
ifAddNew = false;
}
}
Expand Down Expand Up @@ -9806,7 +9807,7 @@ function run() {
}
}
else {
core.setFailed(`[AC] This PR title is not has a type!`);
core.setFailed(`[AC] πŸ›‘ This PR title is not has a type!`);
}
core.info(actions_util_1.THANKS);
}
Expand Down
8 changes: 5 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function run(): Promise<void> {

const ctx = github.context;
if (ctx.eventName.indexOf('pull_request') === -1) {
core.warning(`[AC] This Action is only support PR events.`);
core.warning(`[AC] πŸ›‘ This Action is only support PR events.`);
return;
}

Expand All @@ -25,6 +25,8 @@ async function run(): Promise<void> {
labels: object[];
};

core.info(`[AC] πŸ›Ž This PR number is [${number}].`);

let titleType = title.split(':')[0];
if (titleType.split('(').length > 0) {
titleType = titleType.split('(')[0];
Expand All @@ -36,7 +38,7 @@ async function run(): Promise<void> {
if (enumInput) {
const enumArr = dealStringToArr(enumInput);
if (enumArr.indexOf(titleType) === -1) {
core.warning(`[AC] This PR type: ${titleType} is not in list to deal.`);
core.warning(`[AC] πŸ›‘ This PR type: ${titleType} is not in list to deal.`);
ifAddNew = false;
}
}
Expand Down Expand Up @@ -84,7 +86,7 @@ async function run(): Promise<void> {
}
}
} else {
core.setFailed(`[AC] This PR title is not has a type!`);
core.setFailed(`[AC] πŸ›‘ This PR title is not has a type!`);
}
core.info(THANKS);
} catch (error: any) {
Expand Down

0 comments on commit 19e0dc6

Please sign in to comment.