Skip to content

Commit

Permalink
🚸 Set organization name
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Jul 18, 2023
1 parent e5f1e88 commit 243353f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
17 changes: 11 additions & 6 deletions scan/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69209,19 +69209,24 @@ Best,
currentBranch = github.context.payload.pull_request.head.ref;
}
const newBranchName = `qodana/quick-fixes-${github.context.runId}`;
yield exec.getExecOutput("git", ["config", "user.name", "github-actions"]);
yield exec.getExecOutput("git", ["config", "user.name", "qodana-bot"]);
yield exec.getExecOutput("git", [
"config",
"user.email",
"github-actions@github.com"
"qodana-support@jetbrains.com"
]);
yield exec.getExecOutput("git", ["add", "."]);
yield exec.getExecOutput("git", ["commit", "-m", title]);
yield exec.getExecOutput("git", ["branch", "qodana-fixes"]);
yield exec.getExecOutput("git", ["checkout", currentBranch]);
yield exec.getExecOutput("git", ["merge", "qodana-fixes"]);
if (getInputs().prMode) {
yield exec.getExecOutput("git", [
"pull",
"--rebase",
"origin",
currentBranch
]);
}
if (getInputs().pushFixes === "branch") {
yield exec.getExecOutput("git", ["push", "origin", currentBranch]);
yield exec.getExecOutput("git", ["push", "origin", github.context.ref]);
} else if (getInputs().pushFixes === "pull-request") {
const prBodyFile = path_1.default.join(os.tmpdir(), "pr-body.txt");
fs2.writeFileSync(prBodyFile, prFixesBody(getJobUrl()));
Expand Down
18 changes: 11 additions & 7 deletions scan/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,24 @@ export async function pushQuickFixes(): Promise<void> {
}
const newBranchName = `qodana/quick-fixes-${github.context.runId}`

await exec.getExecOutput('git', ['config', 'user.name', 'github-actions'])
await exec.getExecOutput('git', ['config', 'user.name', 'qodana-bot'])
await exec.getExecOutput('git', [
'config',
'user.email',
'github-actions@github.com'
'qodana-support@jetbrains.com'
])
await exec.getExecOutput('git', ['add', '.'])
await exec.getExecOutput('git', ['commit', '-m', title])
await exec.getExecOutput('git', ['branch', 'qodana-fixes'])
await exec.getExecOutput('git', ['checkout', currentBranch])
await exec.getExecOutput('git', ['merge', 'qodana-fixes'])

if (getInputs().prMode) {
await exec.getExecOutput('git', [
'pull',
'--rebase',
'origin',
currentBranch
])
}
if (getInputs().pushFixes === 'branch') {
await exec.getExecOutput('git', ['push', 'origin', currentBranch])
await exec.getExecOutput('git', ['push', 'origin', github.context.ref])
} else if (getInputs().pushFixes === 'pull-request') {
const prBodyFile = path.join(os.tmpdir(), 'pr-body.txt')
fs.writeFileSync(prBodyFile, prFixesBody(getJobUrl()))
Expand Down

0 comments on commit 243353f

Please sign in to comment.