Skip to content

Commit

Permalink
update comment in GH
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudTT committed Nov 1, 2024
1 parent 9fdcc46 commit 9fd6a96
Showing 1 changed file with 4 additions and 32 deletions.
36 changes: 4 additions & 32 deletions .github/workflows/frontend-lint-license-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,35 +40,6 @@ jobs:
set +e
npm run lint || true # Run lint and allow the workflow to continue even if there are warnings/errors
# # Check if GPG key exists
# - name: Check if GPG key exists
# run: |
# if [ -n "${{ secrets.GPG_PRIVATE_KEY }}" ]; then
# echo "GPG_KEY_EXISTS=true" >> $GITHUB_ENV
# else
# echo "GPG_KEY_EXISTS=false" >> $GITHUB_ENV
# fi

# # Import GPG key if it exists
# - name: Import GPG key if it exists
# if: env.GPG_KEY_EXISTS == 'true'
# uses: crazy-max/ghaction-import-gpg@v6
# with:
# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
# passphrase: ${{ secrets.GPG_PASSPHRASE }}
# git_user_signingkey: true
# git_commit_gpgsign: true

# # Auto-commit changes using stefanzweifel/git-auto-commit-action
# - name: Commit changes
# uses: stefanzweifel/git-auto-commit-action@v5
# with:
# commit_user_name: CleanBot
# commit_user_email: [email protected]
# commit_message: '🚨✨ AUTOMATED COMMIT | Applied Code Formatting, Cleanup and added SPDX license headers'
# commit_options: ${{ env.GPG_KEY_EXISTS == 'true' && '-S' || '' }}
# branch: ${{ github.head_ref }}

# Run ESLint and Capture Output
- name: Run ESLint and Capture Output
working-directory: app/frontend
Expand Down Expand Up @@ -152,11 +123,11 @@ jobs:
if (process.env.MISSING_LC_HEADERS === 'true') {
const flaggedFiles = process.env.LC_FLAGGED_FILES.trim();
commentBody += `## 🚨 SPDX-License Header Errors\n\nThe following files are missing the required license headers:\n\n\`\`\`\n${flaggedFiles}\n\`\`\`\nPlease ensure each of these files includes a valid SPDX license identifier. This is essential for maintaining licensing compliance. Thank you!`;
commentBody += `## 🚨 SPDX-License Header Errors\n\nThe following files are missing the required license headers:\n\n\`\`\`\n${flaggedFiles}\n\`\`\`\nPlease ensure each of these files includes a valid SPDX license identifier to maintain licensing compliance.`;
}
if (lintErrors) {
commentBody += `## Frontend Project: ESLint Errors\n\`\`\`\n${lintErrors}\n\`\`\`\nPlease review and resolve the ESLint errors.`;
commentBody += `\n\n## Frontend Project: ESLint Errors\n\`\`\`\n${lintErrors}\n\`\`\`\nPlease review and resolve the ESLint errors.`;
}
if (commentBody.trim() && issueNumber) {
Expand All @@ -169,8 +140,9 @@ jobs:
} else {
console.log("No relevant errors to report.");
}
- name: Fail the Workflow if LC Headers Are Missing
if: env.MISSING_LC_HEADERS == 'true'
run: |
echo "Failing the workflow because LC headers are missing."
exit 1
exit 1

0 comments on commit 9fd6a96

Please sign in to comment.