-
Notifications
You must be signed in to change notification settings - Fork 189
Description
Is your feature request related to a problem? Please describe.
-
The
.github/workflows/pull-request.ymlhas a job namedCheck-Sensitive-Filesthat detects when a PR has modified files that require additional attention for reviewers. -
The job has the list of these files inside the YAML file
-
This means the YAML instructions (code) and the configuration are not separated. This is not a best practice.
Describe the solution you'd like
-
A python script located in the
.github/workflows/scriptsthat uses a simple text file of regular expressions to evaluate. -
The text file must be located in the
.github/workflows/configdirectory -
The python script must use the argparse library to allow the specification of the configuration file.
-
The python file must also be able to check multiple files and/or directories for the files. There are other python scripts in the
.github/workflows/scriptsthat do the same. You can use them for guidance.1. The new script must be added to this file as a prerequisite to thePre-Test-Checks-Passjob:.github/workflows/pull-request.yml -
The script must be compatible with these python linters. Please research how to evaluate this before submitting the PR. It will save you a lot of time:
- python black
- pylint
- flake8
- Python docstring_parser
- pydocstyle
-
The functionality of the python script must match that of the existing sensitive file check, and must replace one or more relevant lines in the
Check-Sensitive-Filesjob.- Refer to the
Check-ItSkip-Disablejob to see how you can trim the amount of lines in the GitHub action YAML
- Refer to the
Describe alternatives you've considered
- N/A
Approach to be followed (optional)
- N/A
Additional context
-
Similar Pull Requests
-
Similar Issues
- Admin - Python: Script to detect sensitive files with configuration file talawa-admin#5056
- API - Python: Script to detect sensitive files with configuration file talawa-api#5153
- Docs - Python: Script to detect sensitive files with configuration file #1119
- Developer Docs - Python: Script to detect sensitive files with configuration file developer-docs#138
- Mobile - Python: Script to detect sensitive files with configuration file talawa#3301
- github.com/Plugin - Python: Script to detect sensitive files with configuration file talawa-plugin#172