Used inputs
This commit is contained in:
7
app.ts
7
app.ts
@@ -1,10 +1,11 @@
|
||||
import { spawn } from "child_process";
|
||||
import { ChildProcess, SpawnOptions } from "node:child_process";
|
||||
import * as core from '@actions/core';
|
||||
|
||||
// Ignored branches
|
||||
const IGNORED_BRANCHES = ["master", "main", "dev", "release"];
|
||||
const IGNORED_BRANCHES: string[] = core.getInput('branchesToIgnore', { required: false }).split(",");
|
||||
|
||||
const mainBranch = "dev";
|
||||
const mainBranch: string = core.getInput('mainBranch', { required: false });
|
||||
|
||||
enum Action {
|
||||
Rebase = 0,
|
||||
@@ -78,6 +79,7 @@ const buildRebaseDependencyGraph = async (branches: string[]): Promise<Record<st
|
||||
const commitHistories: Record<string, Set<string>> = {};
|
||||
for (const branch of branches) {
|
||||
commitHistories[branch] = await getCommitsForBranch(branch);
|
||||
console.log(commitHistories[branch]);
|
||||
}
|
||||
|
||||
let finalBranches: Record<string, BranchWithDependencies> = {};
|
||||
@@ -115,6 +117,7 @@ const buildRebaseDependencyGraph = async (branches: string[]): Promise<Record<st
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(finalBranches);
|
||||
|
||||
// Set rebase for branches with no dependencies
|
||||
for (const branch of branches) {
|
||||
|
||||
Reference in New Issue
Block a user