Skip to content

Commit

Permalink
add gitlab subgroup support
Browse files Browse the repository at this point in the history
  • Loading branch information
loreanvictor committed Sep 6, 2024
1 parent 5b421a8 commit c091010
Show file tree
Hide file tree
Showing 13 changed files with 515 additions and 114 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Get public repositories from [GitLab](https://about.gitlab.com), [BitBucket](htt
tmplr gitlab:owner/repo
tmplr [email protected]:owner/repo
tmplr https://gitlab.com/owner/repo
tmplr gitlab:owner/group/repo --subgroup

# 🪣 download from BitBucket
tmplr bitbucket:owner/repo
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion e2e/local.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ scenario('local', async (run, { ls, read }) => {
expect(await read('halo.txt')).toBe('Halo World!')
}, {
root: 'target',
skipCI: true,
skipCI: true, // TODO: why should this be skipped?
})


Expand Down
13 changes: 13 additions & 0 deletions e2e/subgroup.test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { scenario } from './util.mjs'


scenario('subgroup', async (run, { $, ls }) => {
await $`rm -f PLACEHOLDER`

expect((await ls()).length).toBe(0)

await run('gitlab:skewed-aspect/test-repos/tmplr-test', '--subgroup', '--skip-warnings')

expect(await ls()).toIncludeAllMembers([ 'README.md', 'nested', 'baz.txt' ])
expect(await ls('nested')).toIncludeAllMembers([ 'baz.txt', 'qux.txt' ])
})
4 changes: 2 additions & 2 deletions e2e/util.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createRequire } from 'module';
const require = createRequire(import.meta.url);

import { toIncludeSameMembers } from 'jest-extended'
expect.extend({ toIncludeSameMembers })
import { toIncludeSameMembers, toIncludeAllMembers } from 'jest-extended'
expect.extend({ toIncludeSameMembers, toIncludeAllMembers })

import { join } from 'path'
import { cp, mkdtemp, rm, access, lstat, readFile } from 'fs/promises'
Expand Down
Loading

0 comments on commit c091010

Please sign in to comment.