feat: support partial GITHUB_REPOSITORY

This commit is contained in:
rlespinasse
2021-01-25 20:49:01 +01:00
committed by Romain Lespinasse
parent 49e1056c70
commit 75ce03b6a0
16 changed files with 467 additions and 71 deletions

28
__tests__/partial.test.ts Normal file
View File

@@ -0,0 +1,28 @@
import {sep} from 'path'
import {get_first_part, get_second_part} from '../src/partial'
function test_get_first_part(
input: string,
separator: string,
expected: string
) {
let actual = get_first_part(input, separator)
expect(actual).toEqual(expected)
}
function test_get_second_part(
input: string,
separator: string,
expected: string
) {
let actual = get_second_part(input, separator)
expect(actual).toEqual(expected)
}
test('get_first_part', () => {
test_get_first_part('first/second', '/', 'first')
})
test('get_second_part', () => {
test_get_second_part('first/second', '/', 'second')
})