-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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) { | ||
|
@@ -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 |