Skip to content

Commit

Permalink
fix: Only split inside webhook URL condition
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyhuy committed Jul 6, 2021
1 parent c16a85a commit daa12e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ async function run() {
const links = core.getInput("links")

if (!!webhookUrl) {
const id = webhookUrl[5];
const token = webhookUrl[6];
const url = webhookUrl.split('/');
const id = url[5];
const token = url[6];
} else {
const id = core.getInput("id");
const token = core.getInput("token");
Expand Down

0 comments on commit daa12e6

Please sign in to comment.