update git command for GA env
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com> Signed-off-by: web-next-automation <web-platform@doordash.com>
This commit is contained in:
committed by
web-next-automation
parent
53c1ec25e2
commit
fe4c26532b
@@ -83,6 +83,7 @@ function registerPackageCommand(program: Command) {
|
||||
.command('check')
|
||||
.option('--ignore', 'Ignore linting failures and only log the results.')
|
||||
.option('--json', 'Output the results as JSON')
|
||||
.option('--since <ref>', 'Check the API against a specific ref')
|
||||
.action(
|
||||
lazy(() => import('./package/schema/openapi/check').then(m => m.command)),
|
||||
);
|
||||
|
||||
@@ -32,7 +32,7 @@ const reduceOpticOutput = (output: string) => {
|
||||
async function check(opts: OptionValues) {
|
||||
const resolvedOpenapiPath = await getPathToCurrentOpenApiSpec();
|
||||
|
||||
let baseRef = opts.since ?? process.env.GITHUB_BASE_REF;
|
||||
let baseRef = opts.since;
|
||||
if (!baseRef) {
|
||||
const { stdout: branch } = await exec(
|
||||
'git merge-base --fork-point origin/master',
|
||||
|
||||
@@ -47,9 +47,10 @@ export async function command(opts: OptionValues) {
|
||||
severity: 0,
|
||||
} as CiRunDetails;
|
||||
for (const pkg of checkablePackages) {
|
||||
const baseRef = opts.since ?? process.env.GITHUB_BASE_REF;
|
||||
const { stdout } = await exec(
|
||||
'yarn',
|
||||
['check:api', '--ignore', '--json'],
|
||||
['check:api', '--ignore', '--json', '--since', baseRef],
|
||||
{
|
||||
cwd: pkg.dir,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user