-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1576f24
commit 6ceaf98
Showing
12 changed files
with
198 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"dependencies": { | ||
"octokit": "^4.0.2", | ||
"simple-git": "^3.26.0", | ||
"ts-node": "^10.9.2", | ||
"zod": "^3.23.8" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { execSync } from 'child_process'; | ||
|
||
import loadConfig from './instances/config'; | ||
// Uses GitHub's official Octokit | ||
import loadOctokit from './instances/octokit'; | ||
import doStuff from './do-stuff'; | ||
|
||
// Run | ||
|
||
(async function main() { | ||
const config = await loadConfig(); | ||
const octokit = await loadOctokit(); | ||
|
||
// Do stuff | ||
await doStuff(); | ||
// Commit changes | ||
execSync('git config --global user.name "Replexica"'); | ||
execSync('git config --global user.email "support@replexica.com"'); | ||
execSync(`git config --global safe.directory ${process.cwd()}`); | ||
|
||
execSync('git add .'); | ||
execSync(`git commit -m "${config.commitMessageText}"`); | ||
execSync('git push'); | ||
|
||
})(); |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import loadEnv from './_env.js'; | ||
|
||
export default async function loadConfig() { | ||
const env = await loadEnv(); | ||
|
||
return { | ||
isPullRequestMode: env.REPLEXICA_PULL_REQUEST, | ||
commitMessageText: env.REPLEXICA_COMMIT_MESSAGE, | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
action/src/instances/octokit.mjs → action/src/instances/octokit.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"compilerOptions": { | ||
"strict": true, | ||
"pretty": true, | ||
"esModuleInterop": true, | ||
"resolveJsonModule": true, | ||
"allowSyntheticDefaultImports": true, | ||
"skipLibCheck": true, | ||
"skipDefaultLibCheck": true, | ||
"moduleResolution": "NodeNext", | ||
"module": "NodeNext", | ||
"target": "ESNext", | ||
"rootDir": "src", | ||
"outDir": "build", | ||
}, | ||
"include": [ | ||
"src/**/*.ts", | ||
"src/**/*.tsx" | ||
], | ||
"exclude": [ | ||
"src/**/*.spec.ts", | ||
"src/**/*.spec.tsx" | ||
] | ||
} |