Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Seokseong Jeon committed Jul 27, 2021
1 parent d951493 commit 9e733f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ try {

const hexo = new Hexo(process.cwd(), {});
hexo.init().then(() => {
console.log(`Converting issue ${endpoint} to Hexo post...`);
gh.request(`GET ${endpoint}`).then((response) => {
const { title, updated_at: date, labels, milestone, body: content } = response.data;
if (milestone.title !== MILESTONE_PUBLISH) {
console.log(`Issue ${endpoint} does not have milestone ${MILESTONE_PUBLISH}`);
console.log(`Issue does not have milestone ${MILESTONE_PUBLISH}`);
} else {
const tags = labels.map((label: any) => label.name);
hexo.post.create({
Expand Down

0 comments on commit 9e733f0

Please sign in to comment.