Skip to content

Commit

Permalink
fix bug for args
Browse files Browse the repository at this point in the history
  • Loading branch information
JackTn committed Dec 19, 2024
1 parent 200bbdd commit 4404ba8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/SDK-Suppressions-Label.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ jobs:
GITHUB_PULL_REQUEST_CONTEXT: ${{ steps.fetch-pullRequest-context.outputs.prContext }}
OUTPUT_FILE: "output.json"
GITHUB_PULL_REQUEST_CHANGE_FILES: ${{ steps.get-changedFiles.outputs.changedFiles }}
GITHUB_PULL_REQUEST_Labels: ${{ steps.fetch-pullRequest-context.outputs.prLabels }}
GITHUB_PULL_REQUEST_LABELS: ${{ steps.fetch-pullRequest-context.outputs.prLabels }}
run: |
node eng/tools/sdk-suppressions/cmd/sdk-suppressions-label.js HEAD^ HEAD $GITHUB_PULL_REQUEST_CHANGE_FILES $GITHUB_PULL_REQUEST_Labels
node eng/tools/sdk-suppressions/cmd/sdk-suppressions-label.js HEAD^ HEAD $GITHUB_PULL_REQUEST_CHANGE_FILES $GITHUB_PULL_REQUEST_LABELS
OUTPUT=$(cat $OUTPUT_FILE)
echo "Script output labels: $OUTPUT"
Expand Down
8 changes: 4 additions & 4 deletions eng/tools/sdk-suppressions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ function getArgsError(): string {
}

export async function main() {
const args: string[] = process.argv.slice(2);
if (args.length === 2) {
const args: string[] = process.argv.slice(4);
if (args.length === 4) {
const baseCommitHash: string = args[0];
const headCommitHash: string = args[1];
const changeFiles: string = args[3];
const lables: string[] = args[4] as unknown as string[];
const changeFiles: string = args[2];
const lables: string[] = args[3] as unknown as string[];
const outputFile = process.env.OUTPUT_FILE as string;
// const prChangeFiles = process.env.GITHUB_PULL_REQUEST_CHANGE_FILES as string;
// const pullRequestContext = process.env.GITHUB_PULL_REQUEST_CONTEXT as string;
Expand Down

0 comments on commit 4404ba8

Please sign in to comment.