-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Actions cannot read teams and this also versions changes.
- Loading branch information
1 parent
a64f31b
commit 0c02c4e
Showing
11 changed files
with
443 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
npx lint-staged | ||
npx tsc | ||
npx tsc | ||
npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { describe, it } from 'node:test' | ||
import assert from 'node:assert/strict' | ||
import { loadRepoList } from './loadRepoList.js' | ||
|
||
void describe('loadRepoList()', () => { | ||
void it('should load the list of repos', async () => { | ||
assert.notEqual( | ||
(await loadRepoList()).find( | ||
(el) => el.name === 'ci' && el.owner === 'hello-nrfcloud', | ||
), | ||
undefined, | ||
) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import path from 'node:path' | ||
import { readFile } from 'node:fs/promises' | ||
import type { Repository } from './listRepos.js' | ||
|
||
export const loadRepoList = async (): Promise<Array<Omit<Repository, 'id'>>> => | ||
(await readFile(path.join(process.cwd(), 'repos.txt'), 'utf-8')) | ||
.trim() | ||
.split('\n') | ||
.filter((s) => !s.startsWith('#')) | ||
.map((s) => { | ||
const [owner, name] = s.split('/') as [string, string] | ||
return { owner, name } | ||
}) |
Oops, something went wrong.