Skip to content

Commit

Permalink
Merge pull request #2 from xt0rted/remove-name-fix
Browse files Browse the repository at this point in the history
Fix problem matcher name retrieval
  • Loading branch information
xt0rted authored Feb 18, 2020
2 parents c493662 + 403afa3 commit 31939ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:

- run: npm run markdownlint

- uses: ./
if: success() || failure()
with:
action: remove

build:
runs-on: ubuntu-latest

Expand Down
5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { promisify } from "util";
import { getInput, setFailed } from "@actions/core";
import { issueCommand } from "@actions/core/lib/command"

import { ProblemMatcher } from "github-actions-problem-matcher-typings";
import { ProblemMatcherDocument } from "github-actions-problem-matcher-typings";

const readFileAsync = promisify(readFile);

Expand All @@ -26,7 +26,8 @@ export async function run(): Promise<void> {

case "remove":
const fileContents = await readFileAsync(matcherFile, { encoding: "utf8" });
const problemMatcher: ProblemMatcher = JSON.parse(fileContents);
const problemMatcherDocument: ProblemMatcherDocument = JSON.parse(fileContents);
const problemMatcher = problemMatcherDocument.problemMatcher[0];

issueCommand(
"remove-matcher",
Expand Down

0 comments on commit 31939ff

Please sign in to comment.