Compare commits
4 Commits
6d641501e5
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 41d5bd5571 | |||
|
|
a58e064f7c | ||
|
|
fa131afee4 | ||
|
|
8ead650a3f |
@@ -18,5 +18,5 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node20'
|
using: 'node24'
|
||||||
main: 'dist/app.js'
|
main: 'dist/app.js'
|
||||||
|
|||||||
29
app.ts
29
app.ts
@@ -217,36 +217,9 @@ const rebaseBranch = async (rebaseAction: RebaseAction): Promise<RebaseAction &
|
|||||||
return { ...rebaseAction, success: doneWithSuccess };
|
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 () => {
|
const setupAutoRebaseGit = async () => {
|
||||||
if (CI_TOKEN) {
|
if (CI_TOKEN) {
|
||||||
await setupCIToken();
|
writeConsole("Found CI_TOKEN, don't forget to set it up in the checkout")
|
||||||
} else {
|
} else {
|
||||||
writeConsole("Couldn't find a CI_TOKEN. Using the gitea ghost.", LogLevel.WARNING);
|
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
@@ -12,7 +12,7 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^2.0.0",
|
||||||
"@skydust/toolkit": "^1.3.2"
|
"@skydust/toolkit": "^1.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
42
pnpm-lock.yaml
generated
42
pnpm-lock.yaml
generated
@@ -9,8 +9,8 @@ importers:
|
|||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@actions/core':
|
'@actions/core':
|
||||||
specifier: ^1.11.1
|
specifier: ^2.0.0
|
||||||
version: 1.11.1
|
version: 2.0.2
|
||||||
'@skydust/toolkit':
|
'@skydust/toolkit':
|
||||||
specifier: ^1.3.2
|
specifier: ^1.3.2
|
||||||
version: 1.3.3
|
version: 1.3.3
|
||||||
@@ -33,17 +33,17 @@ importers:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
'@actions/core@1.11.1':
|
'@actions/core@2.0.2':
|
||||||
resolution: {integrity: sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==}
|
resolution: {integrity: sha512-Ast1V7yHbGAhplAsuVlnb/5J8Mtr/Zl6byPPL+Qjq3lmfIgWF1ak1iYfF/079cRERiuTALTXkSuEUdZeDCfGtA==}
|
||||||
|
|
||||||
'@actions/exec@1.1.1':
|
'@actions/exec@2.0.0':
|
||||||
resolution: {integrity: sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==}
|
resolution: {integrity: sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==}
|
||||||
|
|
||||||
'@actions/http-client@2.2.3':
|
'@actions/http-client@3.0.1':
|
||||||
resolution: {integrity: sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==}
|
resolution: {integrity: sha512-SbGS8c/vySbNO3kjFgSW77n83C4MQx/Yoe+b1hAdpuvfHxnkHzDq2pWljUpAA56Si1Gae/7zjeZsV0CYjmLo/w==}
|
||||||
|
|
||||||
'@actions/io@1.1.3':
|
'@actions/io@2.0.0':
|
||||||
resolution: {integrity: sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==}
|
resolution: {integrity: sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==}
|
||||||
|
|
||||||
'@emnapi/core@1.8.1':
|
'@emnapi/core@1.8.1':
|
||||||
resolution: {integrity: sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==}
|
resolution: {integrity: sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==}
|
||||||
@@ -421,27 +421,27 @@ packages:
|
|||||||
undici-types@7.16.0:
|
undici-types@7.16.0:
|
||||||
resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==}
|
resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==}
|
||||||
|
|
||||||
undici@5.28.4:
|
undici@5.29.0:
|
||||||
resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==}
|
resolution: {integrity: sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==}
|
||||||
engines: {node: '>=14.0'}
|
engines: {node: '>=14.0'}
|
||||||
|
|
||||||
snapshots:
|
snapshots:
|
||||||
|
|
||||||
'@actions/core@1.11.1':
|
'@actions/core@2.0.2':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@actions/exec': 1.1.1
|
'@actions/exec': 2.0.0
|
||||||
'@actions/http-client': 2.2.3
|
'@actions/http-client': 3.0.1
|
||||||
|
|
||||||
'@actions/exec@1.1.1':
|
'@actions/exec@2.0.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@actions/io': 1.1.3
|
'@actions/io': 2.0.0
|
||||||
|
|
||||||
'@actions/http-client@2.2.3':
|
'@actions/http-client@3.0.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
tunnel: 0.0.6
|
tunnel: 0.0.6
|
||||||
undici: 5.28.4
|
undici: 5.29.0
|
||||||
|
|
||||||
'@actions/io@1.1.3': {}
|
'@actions/io@2.0.0': {}
|
||||||
|
|
||||||
'@emnapi/core@1.8.1':
|
'@emnapi/core@1.8.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -741,6 +741,6 @@ snapshots:
|
|||||||
|
|
||||||
undici-types@7.16.0: {}
|
undici-types@7.16.0: {}
|
||||||
|
|
||||||
undici@5.28.4:
|
undici@5.29.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@fastify/busboy': 2.1.1
|
'@fastify/busboy': 2.1.1
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"strict": false,
|
"strict": false,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"module": "esnext",
|
"module": "nodenext",
|
||||||
"moduleResolution": "nodenext",
|
"moduleResolution": "nodenext",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true
|
"isolatedModules": true
|
||||||
|
|||||||
Reference in New Issue
Block a user