Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
##############################################################################
##############################################################################
#
# NOTE!
#
# Please read the README.md file in this directory that defines what should
# be placed in this file
#
##############################################################################
##############################################################################

name: Issue Workflow
on:
issues:
types: ['opened']
jobs:
Opened-issue-label:
name: Adding Issue Label
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
.github/workflows/auto-label.json5
sparse-checkout-cone-mode: false
- uses: Renato66/auto-label@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/github-script@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
script: |
const { owner, repo } = context.repo;
const issue_number = context.issue.number;
const apiParams = {
owner,
repo,
issue_number
};
const labels = await github.rest.issues.listLabelsOnIssue(apiParams);
if(labels.data.reduce((a, c)=>a||["dependencies"].includes(c.name), false))
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ["good first issue", "security"]
});
else if(labels.data.reduce((a, c)=>a||["security", "ui/ux"].includes(c.name), false))
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ["good first issue"]
});


Issue-Greeting:
name: Greeting Message to User
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Congratulations on making your first Issue! :confetti_ball: If you haven't already, check out our [Contributing Guidelines](https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/CONTRIBUTING.md) and [Issue Reporting Guidelines](https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/ISSUE_GUIDELINES.md) to ensure that you are following our guidelines for contributing and making issues."

34 changes: 0 additions & 34 deletions .github/workflows/issues.yml

This file was deleted.

31 changes: 20 additions & 11 deletions .github/workflows/pull-request-target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# NOTE!
#
# Please read the README.md file in this directory that defines what should
# be placed in this file
# be placed in this file
#
##############################################################################
##############################################################################
Expand All @@ -19,22 +19,30 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Add the PR Review Policy
uses: thollander/actions-comment-pull-request@v2
uses: thollander/actions-comment-pull-request@v3
with:
comment_tag: pr_review_policy
comment-tag: pr_review_policy
message: |
## Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Thanks for contributing!
### Testing Your Code

Please make sure your code passes all tests and there are no merge conflicts.

The process helps maintain accurate and well-formatted documentation and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.
Remember, your PRs won't be reviewed until these criteria are met:

1. We don't merge PRs with poor code quality.
1. Follow coding best practices such that CodeRabbit.ai approves your PR.
1. We don't merge PRs with failed tests.
1. When tests fail, click on the `Details` link to learn more.
1. Write sufficient tests for your changes (CodeCov Patch Test). Your testing level must be better than the target threshold of the repository
1. Tests may fail if you edit sensitive files. Ask to add the `ignore-sensitive-files-pr` label if the edits are necessary.
1. We cannot merge PRs with conflicting files. These must be fixed.

Our policies make our code better.

### Reviewers

Do not assign reviewers. Our Queue Monitors will review your PR and assign them.
When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

1. comments in this PR or
Expand All @@ -59,9 +67,10 @@ jobs:
### Other

1. :dart: Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
2. Read the CONTRIBUTING.md file make

- name: Greeting Message to User
uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: "Congratulations on making your first PR! :confetti_ball: If you haven't already, check out our [Contributing Guidelines](https://github.com/PalisadoesFoundation/developer-docs/blob/-/CONTRIBUTING.md) and [PR Reporting Guidelines](https://github.com/PalisadoesFoundation/developer-docs/blob/-/PR_GUIDELINES.md) to ensure that you are following our guidelines for contributing and creating PR."
pr-message: "Congratulations on making your first PR! :confetti_ball: If you haven't already, check out our [Contributing Guidelines](https://github.com/PalisadoesFoundation/talawa-admin/blob/-/CONTRIBUTING.md) and [PR Reporting Guidelines](https://github.com/PalisadoesFoundation/talawa-admin/blob/-/PR_GUIDELINES.md) to ensure that you are following our guidelines for contributing and creating PR."
84 changes: 84 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
##############################################################################
##############################################################################
#
# NOTE!
#
# Please read the README.md file in this directory that defines what should
# be placed in this file
#
##############################################################################
##############################################################################

name: PR Workflow

on:
pull_request:
branches:
- '**'

env:
CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }}

jobs:
Code-Quality-Checks:
name: Performs linting, formatting, type-checking, checking for different source and target branch
runs-on: ubuntu-latest
steps:
- name: Check if the source and target branches are different
if: ${{ github.event.pull_request.base.ref == github.event.pull_request.head.ref }}
run: |
echo "Source Branch ${{ github.event.pull_request.head.ref }}"
echo "Target Branch ${{ github.event.pull_request.base.ref }}"
echo "Error: Source and Target Branches are the same. Please ensure they are different."
echo "Error: Close this PR and try again."
exit 1

Test-Docusaurus-Deployment:
name: Test Deployment to https://developer.palisadoes.org
runs-on: ubuntu-latest
needs: [Code-Quality-Checks]
strategy:
matrix:
node-version: ['24.x']
# Run only if the develop branch and not dependabot
if: ${{ github.event.pull_request.base.ref == 'main' }}
steps:
- name: Checkout the Repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
cache: pnpm
cache-dependency-path: |
pnpm-lock.yaml
package.json

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

# Run Docusaurus in the ./docs directory
- name: Install dependencies
working-directory: ./
run: pnpm install --frozen-lockfile
- name: Test building the website
working-directory: ./
run: pnpm build

Check-Target-Branch:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Check Target Branch
runs-on: ubuntu-latest
steps:
- name: Check if the target branch is 'main'
if: github.event.pull_request.base.ref != 'main'
run: |
echo "Error: Pull request target branch must be 'main'. Please refer PR_GUIDELINES.md"
echo "Error: Close this PR and try again."
exit 1
67 changes: 67 additions & 0 deletions .github/workflows/push-deploy-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
##############################################################################
##############################################################################
#
# NOTE!
#
# Please read the README.md file in this directory that defines what should
# be placed in this file
#
##############################################################################
##############################################################################

name: PUSH Workflow - Website Deployment

on:
push:
branches:
- 'develop'
paths:
- docs/**

env:
CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }}

jobs:
Deploy-Docusaurus:
name: Deploy https://developer.palisadoes.org website
runs-on: ubuntu-latest
# Run only if the develop branch and not dependabot
if: ${{ github.actor != 'dependabot[bot]' }}
environment:
# This "name" has to be the repos' branch that contains
# the current active website. There must be an entry for
# the same branch in the PalisadoesFoundation's
# "Code and automation > Environments > gigithub-pages"
# menu. The branch "name" must match the branch in the
# "on.push.branches" section at the top of this file
name: develop
url: https://developer.palisadoes.org
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/cache@v3
with:
path: .docusaurus
key: docusaurus-${{ hashFiles('docs/**') }}
restore-keys: |
docusaurus-
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.DEPLOY_GITHUB_PAGES }}
- name: Deploy to GitHub Pages
env:
USE_SSH: true
GIT_USER: git
working-directory: .
run: |
git config --global user.email "actions@github.com"
git config --global user.name "gh-actions"
if ! pnpm install --frozen-lockfile; then
echo "Failed to install dependencies"
exit 1
fi
if ! pnpm run deploy; then
echo "Deployment failed"
exit 1
fi

37 changes: 18 additions & 19 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,30 @@ name: Mark stale issues and pull requests

on:
schedule:
- cron: "0 0 * * *"
- cron: "0 0 * * *"

permissions:
issues: write
pull-requests: write

jobs:
stale:

name: Process Stale Issues and PRs
runs-on: ubuntu-latest

steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: '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.'
stale-pr-message: 'This pull request did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please verify it has no conflicts with the develop branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.'
close-issue-message: 'This issue did not get any activity in the past 180 days and thus has been closed. Please check if the newest release or develop branch has it fixed. Please, create a new issue if the issue is not fixed.'
close-pr-message: 'This pull request did not get any activity in the past 180 days and thus has been closed.'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
days-before-stale: 10
days-before-close: 180
remove-stale-when-updated: true
exempt-all-milestones: true
exempt-pr-labels: 'wip'
exempt-issue-labels: 'wip'
operations-per-run: 50
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: '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.'
stale-pr-message: 'This pull request did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please verify it has no conflicts with the develop branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.'
close-issue-message: 'This issue did not get any activity in the past 180 days and thus has been closed. Please check if the newest release or develop branch has it fixed. Please, create a new issue if the issue is not fixed.'
close-pr-message: 'This pull request did not get any activity in the past 180 days and thus has been closed.'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
days-before-stale: 7
days-before-close: 180
remove-stale-when-updated: true
exempt-all-milestones: true
exempt-pr-labels: 'wip'
exempt-issue-labels: 'wip'
operations-per-run: 30
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
##########################################################

package-lock.json
yarn.lock

##########################################################
# Vim editor
Expand Down
Loading
Loading