Compare commits
1 Commits
main
...
26901c4473
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26901c4473 |
@@ -18,5 +18,5 @@ inputs:
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: 'node24'
|
||||
using: 'node20'
|
||||
main: 'dist/app.js'
|
||||
|
||||
29
app.ts
29
app.ts
@@ -217,9 +217,36 @@ const rebaseBranch = async (rebaseAction: RebaseAction): Promise<RebaseAction &
|
||||
return { ...rebaseAction, success: doneWithSuccess };
|
||||
}
|
||||
|
||||
const setupCIToken = async () => {
|
||||
writeConsole("Overriding git repository auth with CI_TOKEN")
|
||||
|
||||
const remoteUrl = await runGitCommand([
|
||||
"remote",
|
||||
"get-url",
|
||||
"origin"
|
||||
]);
|
||||
|
||||
const httpLessUrl = remoteUrl.trim().replace(/https?:\/\//, "");
|
||||
const newUrl = `https://MilaBot:${ CI_TOKEN }@${ httpLessUrl }.git`;
|
||||
|
||||
await runGitCommand([
|
||||
"remote",
|
||||
"set-url",
|
||||
"origin",
|
||||
newUrl
|
||||
]);
|
||||
|
||||
await runGitCommand([
|
||||
"config",
|
||||
"--local",
|
||||
"--unset",
|
||||
`http.https://${ GITHUB_SERVER_URL.replace(/https?:\/\//, "") }/.extraheader`
|
||||
]);
|
||||
}
|
||||
|
||||
const setupAutoRebaseGit = async () => {
|
||||
if (CI_TOKEN) {
|
||||
writeConsole("Found CI_TOKEN, don't forget to set it up in the checkout")
|
||||
await setupCIToken();
|
||||
} else {
|
||||
writeConsole("Couldn't find a CI_TOKEN. Using the gitea ghost.", LogLevel.WARNING);
|
||||
}
|
||||
|
||||
68
dist/app.js
vendored
68
dist/app.js
vendored
File diff suppressed because one or more lines are too long
@@ -16,7 +16,7 @@
|
||||
"@skydust/toolkit": "^1.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.0.0",
|
||||
"@types/node": "^25.0.0",
|
||||
"husky": "^9.1.7",
|
||||
"rolldown": "1.0.0-beta.60",
|
||||
"tsx": "^4.19.2",
|
||||
|
||||
42
pnpm-lock.yaml
generated
42
pnpm-lock.yaml
generated
@@ -10,14 +10,14 @@ importers:
|
||||
dependencies:
|
||||
'@actions/core':
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.2
|
||||
version: 2.0.0
|
||||
'@skydust/toolkit':
|
||||
specifier: ^1.3.2
|
||||
version: 1.3.3
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^24.0.0
|
||||
version: 24.10.9
|
||||
specifier: ^25.0.0
|
||||
version: 25.0.9
|
||||
husky:
|
||||
specifier: ^9.1.7
|
||||
version: 9.1.7
|
||||
@@ -33,17 +33,17 @@ importers:
|
||||
|
||||
packages:
|
||||
|
||||
'@actions/core@2.0.2':
|
||||
resolution: {integrity: sha512-Ast1V7yHbGAhplAsuVlnb/5J8Mtr/Zl6byPPL+Qjq3lmfIgWF1ak1iYfF/079cRERiuTALTXkSuEUdZeDCfGtA==}
|
||||
'@actions/core@2.0.0':
|
||||
resolution: {integrity: sha512-iGW52/zqhPUFnYl0s1ioXfJu86LGs7b+GYuO38JMPpsh14FQrNj3n2JBpC+vZ2CFS4lERQyn5koLDopY+6V/PQ==}
|
||||
|
||||
'@actions/exec@2.0.0':
|
||||
resolution: {integrity: sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==}
|
||||
'@actions/exec@1.1.1':
|
||||
resolution: {integrity: sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==}
|
||||
|
||||
'@actions/http-client@3.0.1':
|
||||
resolution: {integrity: sha512-SbGS8c/vySbNO3kjFgSW77n83C4MQx/Yoe+b1hAdpuvfHxnkHzDq2pWljUpAA56Si1Gae/7zjeZsV0CYjmLo/w==}
|
||||
'@actions/http-client@3.0.0':
|
||||
resolution: {integrity: sha512-1s3tXAfVMSz9a4ZEBkXXRQD4QhY3+GAsWSbaYpeknPOKEeyRiU3lH+bHiLMZdo2x/fIeQ/hscL1wCkDLVM2DZQ==}
|
||||
|
||||
'@actions/io@2.0.0':
|
||||
resolution: {integrity: sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==}
|
||||
'@actions/io@1.1.3':
|
||||
resolution: {integrity: sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==}
|
||||
|
||||
'@emnapi/core@1.8.1':
|
||||
resolution: {integrity: sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==}
|
||||
@@ -307,8 +307,8 @@ packages:
|
||||
'@tybys/wasm-util@0.10.1':
|
||||
resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==}
|
||||
|
||||
'@types/node@24.10.9':
|
||||
resolution: {integrity: sha512-ne4A0IpG3+2ETuREInjPNhUGis1SFjv1d5asp8MzEAGtOZeTeHVDOYqOgqfhvseqg/iXty2hjBf1zAOb7RNiNw==}
|
||||
'@types/node@25.0.9':
|
||||
resolution: {integrity: sha512-/rpCXHlCWeqClNBwUhDcusJxXYDjZTyE8v5oTO7WbL8eij2nKhUeU89/6xgjU7N4/Vh3He0BtyhJdQbDyhiXAw==}
|
||||
|
||||
ajv@8.17.1:
|
||||
resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==}
|
||||
@@ -427,21 +427,21 @@ packages:
|
||||
|
||||
snapshots:
|
||||
|
||||
'@actions/core@2.0.2':
|
||||
'@actions/core@2.0.0':
|
||||
dependencies:
|
||||
'@actions/exec': 2.0.0
|
||||
'@actions/http-client': 3.0.1
|
||||
'@actions/exec': 1.1.1
|
||||
'@actions/http-client': 3.0.0
|
||||
|
||||
'@actions/exec@2.0.0':
|
||||
'@actions/exec@1.1.1':
|
||||
dependencies:
|
||||
'@actions/io': 2.0.0
|
||||
'@actions/io': 1.1.3
|
||||
|
||||
'@actions/http-client@3.0.1':
|
||||
'@actions/http-client@3.0.0':
|
||||
dependencies:
|
||||
tunnel: 0.0.6
|
||||
undici: 5.29.0
|
||||
|
||||
'@actions/io@2.0.0': {}
|
||||
'@actions/io@1.1.3': {}
|
||||
|
||||
'@emnapi/core@1.8.1':
|
||||
dependencies:
|
||||
@@ -601,7 +601,7 @@ snapshots:
|
||||
tslib: 2.8.1
|
||||
optional: true
|
||||
|
||||
'@types/node@24.10.9':
|
||||
'@types/node@25.0.9':
|
||||
dependencies:
|
||||
undici-types: 7.16.0
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"strict": false,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "nodenext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "nodenext",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true
|
||||
|
||||
Reference in New Issue
Block a user