Skip to content

Commit 39a14ec

Browse files
committed
update logging from debug to info for branch existence check
1 parent 42a24e6 commit 39a14ec

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

__tests__/functions/prechecks.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3749,7 +3749,7 @@ test('passes prechecks when branch exists (normal deployment)', async () => {
37493749
expect(result.status).toBe(true)
37503750
expect(result.ref).toBe('test-ref')
37513751
expect(debugMock).toHaveBeenCalledWith('checking if branch exists: test-ref')
3752-
expect(debugMock).toHaveBeenCalledWith('✅ branch exists: test-ref')
3752+
expect(infoMock).toHaveBeenCalledWith('✅ branch exists: test-ref')
37533753
})
37543754

37553755
test('skips branch existence check when deploying to stable branch', async () => {

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/functions/prechecks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ export async function prechecks(context, octokit, data) {
398398
branch: ref,
399399
headers: API_HEADERS
400400
})
401-
core.debug(`✅ branch exists: ${ref}`)
401+
core.info(`✅ branch exists: ${ref}`)
402402
} catch (error) {
403403
if (error.status === 404) {
404404
message = `### ⚠️ Cannot proceed with deployment\n\n- ref: \`${ref}\`\n\nThe branch for this pull request no longer exists. This can happen if the branch was deleted after the PR was merged or closed. If you need to deploy, you can:\n- Use the stable branch deployment (e.g., \`${data.inputs.trigger} ${data.inputs.stable_branch}\`)\n- Use an exact SHA deployment if enabled (e.g., \`${data.inputs.trigger} ${sha}\`)\n\n> If you are running this command on a closed pull request, you can also try reopening the pull request to restore the branch for a deployment.`

0 commit comments

Comments
 (0)