Skip to content
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 12 commits into from
Mar 15, 2024

Conversation

ramanv0
Copy link
Contributor

@ramanv0 ramanv0 commented Feb 13, 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

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

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

Copy link
Owner

@ShishirPatil ShishirPatil left a 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 🚀

@ShishirPatil ShishirPatil merged commit 191e9fc into ShishirPatil:main Mar 15, 2024
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants