Skip to content

Commit

Permalink
chore: empty string test
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Oct 8, 2024
1 parent 6f16e90 commit f13fae7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/empty-string-checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async function createReview(violations: Array<{ file: string; line: number; cont
pull_number: parseInt(pullNumber),
event: "COMMENT",
comments: reviewComments,
body: "Empty strings detected in the code. Please review.",
body: "> [!WARNING]\n> Empty strings detected in the code. Please review.",
});
}

Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/no-empty-strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,21 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.10.0'
node-version: "20.10.0"
- name: Get GitHub App token
uses: tibdex/[email protected]
id: get_installation_token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Install Dependencies
run: |
yarn add tsx simple-git
- name: Check for Empty Strings
run: |
yarn tsx .github/empty-string-checker.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.get_installation_token.outputs.token }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_BASE_REF: ${{ github.base_ref }}
GITHUB_BASE_REF: ${{ github.base_ref }}

0 comments on commit f13fae7

Please sign in to comment.