diff --git a/.github/workflows/linear-check.yml b/.github/workflows/linear-check.yml index bf1dad039..70f370a23 100644 --- a/.github/workflows/linear-check.yml +++ b/.github/workflows/linear-check.yml @@ -18,6 +18,10 @@ jobs: with: fetch-depth: 0 + - name: Fetch main branch + run: | + git fetch origin ${{ github.event.pull_request.base.ref }}:refs/remotes/origin/main + - uses: actions/setup-node@v4 with: node-version: 20 diff --git a/tools/linear-checker/src/index.js b/tools/linear-checker/src/index.js index 80f0f1550..e7540c6bf 100644 --- a/tools/linear-checker/src/index.js +++ b/tools/linear-checker/src/index.js @@ -52,7 +52,8 @@ const issues = fileAdditions.flatMap(({ fileName, additions }) => additions .map(({ addition, line }) => { const [_, type, desc] = addition.match(/(TODO|FIXME):? (.+)/) ?? []; - const [__, match] = desc ? (desc.match(/MET-(\d+)/) ?? []) : []; + const matches = desc ? (desc.match(/(MET-(\d+))|#(\d+)/) ?? []) : []; + const match = matches[2] ?? matches[3]; const ticket = match && parseInt(match); return { file: fileName, type, desc, line, ticket, source: addition }; })