Skip to content

Commit 923a596

Browse files
committed
release: 0.3.14
1 parent 471380c commit 923a596

File tree

3 files changed

+33
-15
lines changed

3 files changed

+33
-15
lines changed

dist/index.mjs

+30-12
Original file line numberDiff line numberDiff line change
@@ -74810,6 +74810,35 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
7481074810

7481174811
/* global $ */
7481274812
$.verbose = false
74813+
const retryLimit = 10
74814+
74815+
const getResult = async (context, token, branch, repo, files, message, tag, count) => {
74816+
if (!count) count = 0
74817+
try {
74818+
const result = await (0,_commit_mjs__WEBPACK_IMPORTED_MODULE_2__/* .commit */ .t)(
74819+
{
74820+
token,
74821+
branch,
74822+
owner: repo[0],
74823+
repo: repo[1],
74824+
},
74825+
files,
74826+
message,
74827+
tag
74828+
)
74829+
echo`${JSON.stringify({ result, context, branch, repo, message, tag }, undefined, 2)}`
74830+
return result
74831+
} catch (error) {
74832+
if (error.message === 'Update is not a fast forward' && count <= retryLimit ) {
74833+
count++
74834+
return await getResult(context, token, branch, repo, files, message, tag, count)
74835+
} else if (error.message === 'Update is not a fast forward') {
74836+
throw new Error('Update is not a fast forward, retry limit reached.')
74837+
} else {
74838+
throw error
74839+
}
74840+
}
74841+
}
7481374842

7481474843
try {
7481574844
const filesInput = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput('files')
@@ -74820,18 +74849,7 @@ try {
7482074849
const branch = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput('ref') || context.github.ref_name
7482174850
const tag = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput('tag') || false
7482274851
const files = await (0,_get_files_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getFiles */ .b)(filesInput)
74823-
const result = await (0,_commit_mjs__WEBPACK_IMPORTED_MODULE_2__/* .commit */ .t)(
74824-
{
74825-
token,
74826-
branch,
74827-
owner: repo[0],
74828-
repo: repo[1],
74829-
},
74830-
files,
74831-
message,
74832-
tag
74833-
)
74834-
echo`${JSON.stringify({ result, context, branch, repo, message, tag }, undefined, 2)}`
74852+
const result = await getResult(context, token, branch, repo, files, message, tag)
7483574853
_actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput('sha', result.object?.sha)
7483674854
} catch (error) {
7483774855
_actions_core__WEBPACK_IMPORTED_MODULE_0__.setFailed(error.message)

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "multi-file-commit",
3-
"version": "0.3.13",
3+
"version": "0.3.14",
44
"description": "",
55
"main": "src/index.mjs",
66
"scripts": {

0 commit comments

Comments
 (0)