Skip to content

Commit

Permalink
chore: remove default values
Browse files Browse the repository at this point in the history
  • Loading branch information
obeys committed Dec 12, 2024
1 parent 53adeb4 commit 9d2754e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .github/empty-string-checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ const token = process.env.GITHUB_TOKEN;
const [owner, repo] = process.env.GITHUB_REPOSITORY?.split("/") || [];
const pullNumber = process.env.GITHUB_PR_NUMBER || process.env.PULL_REQUEST_NUMBER || "0";
const baseRef = process.env.GITHUB_BASE_REF;
const excludedFiles = (process.env.EXCLUDED_FILES || "")
.split("\n")
.map((file) => file.trim())
.filter(Boolean);
const excludedFiles: string[] = [];

if (process.env.EXCLUDED_FILES) {
excludedFiles.push(
...process.env.EXCLUDED_FILES.split("\n")
.map((file) => file.trim())
.filter(Boolean)
);
}

if (!token || !owner || !repo || pullNumber === "0" || !baseRef) {
core.setFailed("Missing required environment variables.");
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/no-empty-strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ jobs:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_BASE_REF: ${{ github.base_ref }}
EXCLUDED_FILES: |
.github/empty-string-checker.ts
EXCLUDED_FILES:

0 comments on commit 9d2754e

Please sign in to comment.