mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
feat: add-paths input (#1010)
* add add-pattern-array argument * ignore return code * doc to add-pattern-array * update README.md * cleanup after success commit * fix integration tests * add test * update naming and docs * update readme * fix missing await * update docs Co-authored-by: avdim <avdim@mail.ru> Co-authored-by: Авдеев Дима <avdeev@tutu.tech>
This commit is contained in:
parent
4b53b6fd1a
commit
dcd5fd746d
9 changed files with 229 additions and 65 deletions
|
@ -25,6 +25,9 @@ const BASE = DEFAULT_BRANCH
|
|||
const FORK_REMOTE_URL = 'git://127.0.0.1/test-fork.git'
|
||||
const FORK_REMOTE_NAME = 'fork'
|
||||
|
||||
const ADD_PATHS = ['-A']
|
||||
const ADD_PATHS_WILDCARD = ['*.txt']
|
||||
|
||||
async function createFile(filename: string, content?: string): Promise<string> {
|
||||
const _content = content ? content : uuidv4()
|
||||
const filepath = path.join(REPO_PATH, filename)
|
||||
|
@ -220,7 +223,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('none')
|
||||
expect(await gitLogMatches([INIT_COMMIT_MESSAGE])).toBeTruthy()
|
||||
|
@ -236,7 +240,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(trackedContent)
|
||||
|
@ -263,7 +268,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -283,7 +289,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(UNTRACKED_FILE)).toEqual(untrackedContent)
|
||||
|
@ -310,7 +317,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -332,7 +340,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -360,7 +369,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('not-updated')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -380,7 +390,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -416,7 +427,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -446,7 +458,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -473,7 +486,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeFalsy()
|
||||
|
@ -493,7 +507,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -532,7 +547,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeFalsy()
|
||||
|
@ -558,7 +574,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -600,7 +617,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeFalsy()
|
||||
|
@ -621,7 +639,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(commits.changes.tracked)
|
||||
|
@ -651,7 +670,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -676,7 +696,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -710,7 +731,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -737,7 +759,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -779,7 +802,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -805,7 +829,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
FORK_REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -833,7 +858,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
FORK_REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -854,7 +880,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
true
|
||||
true,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -889,7 +916,8 @@ describe('create-or-update-branch tests', () => {
|
|||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
true
|
||||
true,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -907,6 +935,59 @@ describe('create-or-update-branch tests', () => {
|
|||
)
|
||||
})
|
||||
|
||||
it('tests create and update with wildcard add-paths', async () => {
|
||||
// The pull request branch will not be updated
|
||||
|
||||
// Create tracked and untracked file changes
|
||||
const changes = await createChanges()
|
||||
const commitMessage = uuidv4()
|
||||
const result = await createOrUpdateBranch(
|
||||
git,
|
||||
commitMessage,
|
||||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false,
|
||||
ADD_PATHS_WILDCARD
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
expect(await getFileContent(UNTRACKED_FILE)).toEqual(changes.untracked)
|
||||
expect(
|
||||
await gitLogMatches([commitMessage, INIT_COMMIT_MESSAGE])
|
||||
).toBeTruthy()
|
||||
|
||||
// Push pull request branch to remote
|
||||
await git.push([
|
||||
'--force-with-lease',
|
||||
REMOTE_NAME,
|
||||
`HEAD:refs/heads/${BRANCH}`
|
||||
])
|
||||
|
||||
await afterTest(false)
|
||||
await beforeTest()
|
||||
|
||||
// Create tracked and untracked file changes
|
||||
const _changes = await createChanges()
|
||||
const _commitMessage = uuidv4()
|
||||
const _result = await createOrUpdateBranch(
|
||||
git,
|
||||
_commitMessage,
|
||||
'',
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false,
|
||||
ADD_PATHS_WILDCARD
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(_changes.tracked)
|
||||
expect(await getFileContent(UNTRACKED_FILE)).toEqual(_changes.untracked)
|
||||
expect(
|
||||
await gitLogMatches([_commitMessage, INIT_COMMIT_MESSAGE])
|
||||
).toBeTruthy()
|
||||
})
|
||||
|
||||
// Working Base is Not Base (WBNB)
|
||||
|
||||
it('tests no changes resulting in no new branch being created (WBNB)', async () => {
|
||||
|
@ -920,7 +1001,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('none')
|
||||
expect(await gitLogMatches([INIT_COMMIT_MESSAGE])).toBeTruthy()
|
||||
|
@ -939,7 +1021,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(trackedContent)
|
||||
|
@ -969,7 +1052,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -992,7 +1076,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(UNTRACKED_FILE)).toEqual(untrackedContent)
|
||||
|
@ -1022,7 +1107,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -1047,7 +1133,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -1078,7 +1165,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('not-updated')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -1101,7 +1189,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -1140,7 +1229,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -1173,7 +1263,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -1203,7 +1294,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeFalsy()
|
||||
|
@ -1228,7 +1320,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -1270,7 +1363,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeFalsy()
|
||||
|
@ -1299,7 +1393,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -1344,7 +1439,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeFalsy()
|
||||
|
@ -1368,7 +1464,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(commits.changes.tracked)
|
||||
|
@ -1401,7 +1498,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -1429,7 +1527,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -1466,7 +1565,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -1496,7 +1596,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -1541,7 +1642,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -1570,7 +1672,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
FORK_REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -1601,7 +1704,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
FORK_REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -1629,7 +1733,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -1661,7 +1766,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -1686,7 +1792,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(result.action).toEqual('created')
|
||||
expect(await getFileContent(TRACKED_FILE)).toEqual(changes.tracked)
|
||||
|
@ -1726,7 +1833,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
expect(_result.action).toEqual('updated')
|
||||
expect(_result.hasDiffWithBase).toBeTruthy()
|
||||
|
@ -1757,7 +1865,8 @@ describe('create-or-update-branch tests', () => {
|
|||
BASE,
|
||||
BRANCH,
|
||||
REMOTE_NAME,
|
||||
false
|
||||
false,
|
||||
ADD_PATHS
|
||||
)
|
||||
// The action cannot successfully create the branch
|
||||
expect(result.action).toEqual('none')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue