PalisadoesFoundation / talawa

Community Organization Management Software. Click on the link below to see our documentation.
https://docs.talawa.io/
GNU General Public License v3.0
306 stars 435 forks source link

Mobile GitHub Action: Fix `authorized-changes-detection` #2377

Closed palisadoes closed 2 months ago

palisadoes commented 4 months ago

Is your feature request related to a problem? Please describe.

  1. We have a GitHub action file authorized-changes-detection.yml that, during pull requests, detects when sensitive files are modified and exits with an error.
    1. Unfortunately it does not mention the file(s) that is modifed. This would be very helpful
  2. We have multiple file checks that could be consolidated into one GitHub action

Describe the solution you'd like

  1. All work must be done on the develop branch
  2. Use the work in this PR as a guide
    1. https://github.com/PalisadoesFoundation/talawa-admin/pull/1543
  3. Migrate the functionality of the authorized-changes-detection.yml file to a file called sensitive_files.txt
    1. Use this file as a guide, but with the content of the existing authorized-changes-detection.yml file
      1. https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/.github/workflows/sensitive_files.txt
  4. Create a script check_files.py in the .github/workflows/ directory whose content is identical to that in this file
    1. https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/.github/workflows/check_files.py
  5. Update pull-request.yml
    1. Create a Check-Changed-Files: key section identical to that found in:
      1. https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/.github/workflows/pull-request.yml
    2. Check-Changed-Files: must need Flutter-Codebase-Check to run as a pre-requisite dependency
  6. Delete the Branch-check: key section, as this is now handled by the new script
  7. The authorized-changes-detection.yml file must be deleted.
  8. Test your work by creating commits in your PR that:
    1. Exceed 20 modified files where the GitHub action must fail
    2. Update any of the files in the new sensitive_files.txt where the GitHub action must fail
  9. Only the modified files in the .github/workflows/ directory must be submitted in the final PR

Describe alternatives you've considered

Approach to be followed (optional)

Additional context

Potential internship candidates

Please read this if you are planning to apply for a Palisadoes Foundation internship

palisadoes commented 4 months ago

The original PR had to be reverted. This cannot be assigned until the source code is fixed.

github-actions[bot] commented 4 months ago

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.