Skip to content

Commit

Permalink
fix: fixing attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
luckasRanarison committed Nov 27, 2024
1 parent e58a0e6 commit 5d6d16a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/linear-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ jobs:
with:
fetch-depth: 0

- name: Fetch main branch
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}:refs/remotes/origin/main
git checkout origin/main
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: tools/linear-checker/package-lock.json

- name: Check comment issues
working-directory: tools/linear-checker
Expand Down
3 changes: 2 additions & 1 deletion tools/linear-checker/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
})
Expand Down

0 comments on commit 5d6d16a

Please sign in to comment.