Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github Actions to Maintain API Zoo Index (#188)
This PR introduces two Github Actions: one for automating the process of maintaining an up-to-date API Zoo Index and another for automating the validation of new API documentation added to the API Zoo for duplicates. #### Automatically update the mongodb index of the API Zoo when new API documentation is added - This Github Action is designed to automate the process of updating the mongodb API Zoo index whenever new API documentation is added to the `data/apizoo/` directory in the repo. Upon each push to the main branch that includes changes to `data/apizoo/`, the action sends a request to the `/api/update` endpoint of the server (which is running on a GCP VM instance), which in turn updates the mongodb backend store with the new documentation. This ensures that the API Zoo Index remains current and reflects the latest additions. #### Automatically validate new API documentation for duplicates - This GitHub Action is aimed at automating the maintenance of the quality of the API Zoo directory by validating new API documentation against existing entries. The action is triggered by pull requests affecting the `data/apizoo/` directory and verifies that there are no duplicates among the newly added APIs by querying the `/api/validate` endpoint of the server. If duplicate APIs are found, the action posts a comment on the PR to alert reviewers. If either of the Github actions fail due to server-side errors (resulting in a non HTTP-200 response), an issue is automatically raised. The first example below shows the issue generated when authorization for the `/api/update` server endpoint fails (due to the authorization token being purposefully removed from the request sent by the action): ![Screenshot 2024-02-22 at 1 20 26 AM](https://github.com/ShishirPatil/gorilla/assets/76065183/186aa710-f6e9-4e20-ac98-db8811ed023d) This second example shows the issue generated when a request to the `/api/validate` endpoint results in the server responding with an error: ![Screenshot 2024-02-22 at 1 19 48 AM](https://github.com/ShishirPatil/gorilla/assets/76065183/cb610e60-0be1-4443-a4d0-660cd51d27ef) The screenshot below shows the message that is automatically added to a PR that attempts to update the API Zoo with duplicate API documentation entries: ![Screenshot 2024-02-22 at 1 39 34 AM](https://github.com/ShishirPatil/gorilla/assets/76065183/4a93684e-264b-4f3f-aebe-d70290390a77) --------- Co-authored-by: Raman Varma <[email protected]> Co-authored-by: Shishir Patil <[email protected]>
- Loading branch information