github-actions-problem-matcher-typings
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

GitHub Actions Problem Matcher Typings

CI Dependabot Status

A set of typings for the problem matcher file format based on the docs at actions/toolkit. You can use these to help with testing your regex or if you need to load the file and work with it inside of your action.

Usage

import { problemMatcher as problemMatcherJson } from "../.github/problem-matcher.json";
import { ProblemMatcher } from "github-actions-problem-matcher-typings";

const problemMatcher: ProblemMatcher = problemMatcherJson[0];

describe("problemMatcher", () => {
  it("has the correct name", () => {
    expect(problemMatcher.owner).toEqual("your-matcher");
  });
});

To load the problem matcher as a module you'll need to update your tsconfig.json like so:

{
  "compilerOptions": {
    "resolveJsonModule": true /* Allows for importing .json files as modules. */
  }
}

License

The scripts and documentation in this project are released under the MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i github-actions-problem-matcher-typings

Weekly Downloads

49

Version

1.1.0

License

MIT

Unpacked Size

12.8 kB

Total Files

11

Last publish

Collaborators

  • xt0rted