merge-me-action
merge-me-action copied to clipboard
SyntaxError: Unexpected token '?' when action is executed
How would you describe the issue?
An error occurs when auto-merge is attempted since v2.9.31
(and the corresponding bump of the v2
tag).
How can we reproduce the issue?
Push a new commit that leads to an action execution with an auto-merge step.
What are the expected results?
Auto-merge being executed.
What are the actual results?
The following error is observed:
Run ridedott/merge-me-action@v2
with:
GITHUB_LOGIN: <redacted>
MERGE_METHOD: SQUASH
GITHUB_TOKEN: ***
ENABLE_GITHUB_API_PREVIEW: false
ENABLED_FOR_MANUAL_CHANGES: false
MAXIMUM_RETRIES: 3
env:
ACR_RELEASE: <redacted>.azurecr.io
/home/runner/work/_actions/ridedott/merge-me-action/v2/dist/index.js.cache.js:25
*/const s=r(5680);const toRegexRange=(e,t,r)=>{if(s(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(s(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let o={relaxZeros:true,...r};if(typeof o.strictZeros==="boolean"){o.relaxZeros=o.strictZeros===false}let n=String(o.relaxZeros);let i=String(o.shorthand);let a=String(o.capture);let u=String(o.wrap);let c=e+":"+t+"="+n+i+a+u;if(toRegexRange.cache.hasOwnProperty(c)){return toRegexRange.cache[c].result}let l=Math.min(e,t);let p=Math.max(e,t);if(Math.abs(l-p)===1){let r=e+"|"+t;if(o.capture){return`(${r})`}if(o.wrap===false){return r}return`(?:${r})`}let d=hasPadding(e)||hasPadding(t);let m={min:e,max:t,a:l,b:p};let g=[];let h=[];if(d){m.isPadded=d;m.maxLen=String(m.max).length}if(l<0){let e=p<0?Math.abs(p):1;h=splitToPatterns(e,Math.abs(l),m,o);l=m.a=0
SyntaxError: Unexpected token '?'
at new Script (vm.js:84:7)
at Object.<anonymous> (/home/runner/work/_actions/ridedott/merge-me-action/v2/dist/index.js:6:16)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at internal/main/run_main_module.js:17:11
How much does it hurt?
We can specify the previous working version 2.9.30
to be used, but tag v2
is currently not working for us.