Skip to content

Commit

Permalink
Merge pull request #1 from Suvraneel/main
Browse files Browse the repository at this point in the history
Fix Issue message input not found
  • Loading branch information
Saviour1001 authored Sep 30, 2021
2 parents 3b23276 + 3171126 commit cae9ea9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
8 changes: 2 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ inputs:
issue_message:
description: 'Put your customized issue message'
required: true

PR_message:
description: 'Put your customized PR message'
required: true


runs:
using: 'node12'
main: 'dist/index.js'

branding:
color: 'orange'
icon: 'award'
icon: 'award'
7 changes: 2 additions & 5 deletions dist/index.js

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

7 changes: 2 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ const run = async () => {
try {
const github_token = core.getInput("GITHUB_TOKEN");
const issue_message = core.getInput("issue_message");
const PR_message = core.getInput("PR_message");
const context = github.context;

const event = github.context.eventName;
let message;

const octokit = new github.getOctokit(github_token);

if (!issue_message || !PR_message) {
if (!issue_message) {
core.warning('"message" input not found.');
return;
}
Expand All @@ -28,9 +27,7 @@ const run = async () => {
});

// Checking for the type of event.
if (event === "pull_request") {
message = PR_message;
} else if (event === "issues") {
if (event === "issues") {
message = issue_message;

const labels = ["GWOC21"];
Expand Down

0 comments on commit cae9ea9

Please sign in to comment.