Skip to content

Commit

Permalink
impl: atualiza package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanpsv committed Nov 9, 2020
1 parent ea5ed9b commit 9723ed7
Show file tree
Hide file tree
Showing 7 changed files with 610 additions and 582 deletions.
24 changes: 12 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const core = require('@actions/core');
const github = require('@actions/github');
const buildFeedbackMessage = require('./feedbackMessage');
const runEslint = require('./runEslint');
const runStylelint = require('./runStylelint');
const runNpm = require('./runNpm');

const run = async () => {
Expand All @@ -11,20 +11,20 @@ const run = async () => {
const client = github.getOctokit(token);
const { owner, repo, number } = github.context.issue;
const npmStatus = runNpm(root);
const { status: eslintStatus, outcomes: eslintOutcomes } = runEslint(root);
const status = npmStatus + eslintStatus;
const feedbackMessage = buildFeedbackMessage(eslintOutcomes, root);
const { status: stylelintStatus, outcomes: stylelintOutcomes } = runStylelint(root);
const status = npmStatus + stylelintStatus;
// const feedbackMessage = buildFeedbackMessage(stylelintOutcomes, root);

console.log('Exit code:', status);
console.log('All errors:', eslintOutcomes);
console.log('Feedback message:\n', feedbackMessage);
console.log('All errors:', stylelintOutcomes);
// console.log('Feedback message:\n', feedbackMessage);

await client.issues.createComment({
owner,
repo,
issue_number: number,
body: feedbackMessage,
});
// await client.issues.createComment({
// owner,
// repo,
// issue_number: number,
// body: feedbackMessage,
// });

process.exit(status);
} catch (error) {
Expand Down
Loading

0 comments on commit 9723ed7

Please sign in to comment.