[DRAFT] Set up linters using GitHub Actions #769
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR sets up linters using GitHub Actions (GHA) for the repository. The linters will be configured based on the language used in the repository. The following linters will be set up:
The setup will only be triggered when a user merges a PR titled "Enable Github Actions".
Changes Made
sweepai/handlers/on_check_suite.py
to add a condition to check if the merged PR is titled "Enable Github Actions". If true, the appropriate linter setup function will be called based on the language of the repository..github/workflows/python_linter.yml
to set up Black and Pylint for Python repositories..github/workflows/js_linter.yml
to set up ESLint for JavaScript repositories..github/workflows/ts_linter.yml
to set up TSC for TypeScript repositories.Testing
Checklist
Fixes #768.
To checkout this PR branch, run the following command in your terminal: