-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Github Actions to Maintain API Zoo Index #188
Merged
Merged
Conversation
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
… db index and validate new apis that are to be added to the apizoo (i.e. check for duplicates; comment on the PR if a duplicate api entry already exists in the apizoo).
…ment and let PR reviewers decide whether to approve the changes.
…p address) to https requests to the server's new subdomain.
…tion can update the API Zoo index.
ShishirPatil
approved these changes
Mar 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for this clean PR @ramanv0 🚀
devanshamin
pushed a commit
to devanshamin/gorilla
that referenced
this pull request
Jul 9, 2024
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]>
aw632
pushed a commit
to vinaybagade/gorilla
that referenced
this pull request
Aug 22, 2024
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]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
data/apizoo/
directory in the repo. Upon each push to the main branch that includes changes todata/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
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):This second example shows the issue generated when a request to the
/api/validate
endpoint results in the server responding with an error: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: