-
-
Notifications
You must be signed in to change notification settings - Fork 976
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main-develop-postgres' into linux_systemd
- Loading branch information
Showing
315 changed files
with
3,618 additions
and
2,820 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
echo "Step 1: Fetching all PR reviews..." | ||
|
||
response=$(curl -s -f -H "Authorization: token $GITHUB_TOKEN" \ | ||
"https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}/reviews?per_page=1000") || { | ||
echo "Error: Failed to fetch reviews from GitHub API" | ||
exit 1 | ||
} | ||
|
||
latest_reviews=$(echo "$response" | jq -c '[.[]] | group_by(.user.login) | map(max_by(.submitted_at))') || { | ||
echo "Error: Failed to process reviews JSON" | ||
exit 1 | ||
} | ||
|
||
if [ "$latest_reviews" = "null" ] || [ -z "$latest_reviews" ]; then | ||
echo "Error: Invalid reviews data" | ||
exit 1 | ||
fi | ||
|
||
echo "Step 2: Checking approval status of 'coderabbitai[bot]'..." | ||
approval_state=$(echo "$latest_reviews" | jq -r '[.[] | select(.user.login == "coderabbitai[bot]" and .state == "APPROVED")] | length') | ||
|
||
if [[ "$approval_state" =~ ^[0-9]+$ ]] && [[ $approval_state -gt 0 ]]; then | ||
echo "Success: PR approved by CodeRabbit.ai." | ||
else | ||
echo "" | ||
echo "ERROR:" | ||
echo "" | ||
echo "1) This PR is not approved by CodeRabbit.ai." | ||
echo "2) In the 'Add a comment' section at the bottom" | ||
echo " of the PR web page, add a comment with the" | ||
echo " statement below to restart a review" | ||
echo "" | ||
echo " @coderabbitai full review" | ||
echo "" | ||
exit 1 | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Development environment setup | ||
|
||
## Prerequisites | ||
|
||
You must have basic competence and experience in the following technologies to be able to set up and work within the development environment of talawa api: | ||
|
||
1. Unix based operating systems like linux based distributions, macOS or windows subsystem for linux. | ||
2. Git | ||
3. Github | ||
4. Docker | ||
5. Docker compose | ||
6. Visual studio code with devcontainers | ||
7. Typescript | ||
8. Node.js | ||
|
||
## Our recommendations | ||
|
||
Linux based distributions are simply the best platform for a very vast majority of use cases related to software development. As such we recommend using popular linux based distributions like fedora, arch, ubuntu, linux mint, debian etc., for having a better experience during software development. | ||
|
||
We make heavy of use docker containers in our workflows. Since, containers are a technology built on top of linux, on non-linux platforms they can only be used by emulating linux where they are ran inside linux based virtual machines. So, you should be aware that there are performance penalties and certain limitations with running containers on platforms like macOS and windows. | ||
|
||
Though, many of these penalties and limitations don't apply to windows subsystem for linux. So, if you plan on using windows, at the very least make use of windows subsystem for linux. | ||
|
||
## Setup | ||
|
||
We provide a mostly automated way of setting up the development environment for talawa api using git, docker and visual studio code as shown in the following video: | ||
|
||
1. Click on the image to play the video | ||
2. The video is partially incorrect. Clone from this repo instead | ||
- https://github.com/PalisadoesFoundation/talawa-api | ||
|
||
[![Talawa API Environment Setup - Development](https://img.youtube.com/vi/jz7koJIXqtk/0.jpg)](https://www.youtube.com/watch?v=jz7koJIXqtk) | ||
|
||
It is very important that you go through [this](https://code.visualstudio.com/docs/devcontainers/containers) official documentation for working with devcontainers in visual studio code. | ||
|
||
# Local production environment setup | ||
|
||
Developers working on client applications making use of talawa api can set up and run a production build of talawa api on their systems locally. | ||
|
||
## Prerequisites | ||
|
||
You must have basic competence and experience in the following technologies to be able to set up and run the production build of talawa api locally on your system: | ||
|
||
1. Git | ||
2. Docker | ||
3. Docker compose | ||
|
||
## Setup | ||
|
||
We provide a mostly automated way of running the production build of talawa api locally on your system using git, docker and docker compose as shown in the following video: | ||
|
||
1. Click on the image to play the video | ||
2. The video is partially incorrect. Clone from this repo instead | ||
- https://github.com/PalisadoesFoundation/talawa-api | ||
|
||
[![Talawa API Environment Setup - Production](https://img.youtube.com/vi/10Zi2srGPHM/0.jpg)](https://www.youtube.com/watch?v=10Zi2srGPHM) |
Oops, something went wrong.