4 Commits

Author SHA1 Message Date
41d5bd5571 Updating action for git checkout v6 2026-01-18 12:28:46 +01:00
Renovate Bot
a58e064f7c Update dependency @actions/core to v2.0.2 2026-01-18 10:48:24 +00:00
Renovate Bot
fa131afee4 Update all non-major dependencies 2026-01-18 10:33:50 +00:00
Renovate Bot
8ead650a3f Update dependency @actions/core to v2 2025-12-10 00:02:31 +00:00
6 changed files with 59 additions and 86 deletions

View File

@@ -18,5 +18,5 @@ inputs:
required: false
runs:
using: 'node20'
using: 'node24'
main: 'dist/app.js'

29
app.ts
View File

@@ -217,36 +217,9 @@ 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) {
await setupCIToken();
writeConsole("Found CI_TOKEN, don't forget to set it up in the checkout")
} else {
writeConsole("Couldn't find a CI_TOKEN. Using the gitea ghost.", LogLevel.WARNING);
}

68
dist/app.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -12,7 +12,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@actions/core": "^1.11.1",
"@actions/core": "^2.0.0",
"@skydust/toolkit": "^1.3.2"
},
"devDependencies": {

42
pnpm-lock.yaml generated
View File

@@ -9,8 +9,8 @@ importers:
.:
dependencies:
'@actions/core':
specifier: ^1.11.1
version: 1.11.1
specifier: ^2.0.0
version: 2.0.2
'@skydust/toolkit':
specifier: ^1.3.2
version: 1.3.3
@@ -33,17 +33,17 @@ importers:
packages:
'@actions/core@1.11.1':
resolution: {integrity: sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==}
'@actions/core@2.0.2':
resolution: {integrity: sha512-Ast1V7yHbGAhplAsuVlnb/5J8Mtr/Zl6byPPL+Qjq3lmfIgWF1ak1iYfF/079cRERiuTALTXkSuEUdZeDCfGtA==}
'@actions/exec@1.1.1':
resolution: {integrity: sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==}
'@actions/exec@2.0.0':
resolution: {integrity: sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==}
'@actions/http-client@2.2.3':
resolution: {integrity: sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==}
'@actions/http-client@3.0.1':
resolution: {integrity: sha512-SbGS8c/vySbNO3kjFgSW77n83C4MQx/Yoe+b1hAdpuvfHxnkHzDq2pWljUpAA56Si1Gae/7zjeZsV0CYjmLo/w==}
'@actions/io@1.1.3':
resolution: {integrity: sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==}
'@actions/io@2.0.0':
resolution: {integrity: sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==}
'@emnapi/core@1.8.1':
resolution: {integrity: sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==}
@@ -421,27 +421,27 @@ packages:
undici-types@7.16.0:
resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==}
undici@5.28.4:
resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==}
undici@5.29.0:
resolution: {integrity: sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==}
engines: {node: '>=14.0'}
snapshots:
'@actions/core@1.11.1':
'@actions/core@2.0.2':
dependencies:
'@actions/exec': 1.1.1
'@actions/http-client': 2.2.3
'@actions/exec': 2.0.0
'@actions/http-client': 3.0.1
'@actions/exec@1.1.1':
'@actions/exec@2.0.0':
dependencies:
'@actions/io': 1.1.3
'@actions/io': 2.0.0
'@actions/http-client@2.2.3':
'@actions/http-client@3.0.1':
dependencies:
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':
dependencies:
@@ -741,6 +741,6 @@ snapshots:
undici-types@7.16.0: {}
undici@5.28.4:
undici@5.29.0:
dependencies:
'@fastify/busboy': 2.1.1

View File

@@ -6,7 +6,7 @@
"strict": false,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"module": "nodenext",
"moduleResolution": "nodenext",
"resolveJsonModule": true,
"isolatedModules": true