Skip to content

Commit

Permalink
Update main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhodes authored Nov 29, 2023
1 parent 9d67388 commit ff299be
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ async function run() {
try {
const message: string = core.getInput('message');
const filePath: string = core.getInput('filePath');
const mdLanguage: string = core.getInput('filePath');
const github_token: string = core.getInput('GITHUB_TOKEN');
const pr_number: string = core.getInput('pr_number');
const comment_tag: string = core.getInput('comment_tag');
Expand All @@ -25,7 +26,13 @@ async function run() {

let content: string = message;
if (!message && filePath) {
content = fs.readFileSync(filePath, 'utf8');
if (mdLanguage) {
content += "\`\`\`${mdLanguage}\n";
}
content += fs.readFileSync(filePath, 'utf8');
if (mdLanguage) {
content += "\n\`\`\`";
}
}

const context = github.context;
Expand Down

0 comments on commit ff299be

Please sign in to comment.