Skip to content

Commit

Permalink
Merge branch 'main' into adding-videos-on-open-source
Browse files Browse the repository at this point in the history
  • Loading branch information
CBID2 authored Jul 21, 2023
2 parents cd71998 + bc6a986 commit da49625
Show file tree
Hide file tree
Showing 143 changed files with 4,453 additions and 1,928 deletions.
32 changes: 16 additions & 16 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@

## Files

README.md @CBID2
.gitignore @CBID2 @rupali-codes
LICENSE @rupali-codes
.github/workflows/ @rupali-codes
app/ @rupali-codes
components/ @CBID2 @rupali-codes
lib/ @CBID2 @rupali-codes
tests/ @rupali-codes
README.md @CBID2 @ujjawaltyagii @rupali-codes
.gitignore @CBID2 @ujjawaltyagii @rupali-codes
LICENSE @rupali-codes @CBID2 @ujjawaltyagii
.github/workflows/ @rupali-codes @CBID2 @ujjawaltyagii
app/ @rupali-codes @ujjawaltyagii
components/ @ujjawaltyagii @CBID2 @rupali-codes
lib/ @CBID2 @rupali-codes @ujjawaltyagii
tests/ @rupali-codes @CBID2 @ujjawaltyagii

## Directories
.github/ @rupali-codes @CBID2
node_modules/ @rupali-codes
public/ @CBID2 @rupali-codes
.env/ @rupali-codes
.github/ @rupali-codes @CBID2 @ujjawaltyagii
node_modules/ @rupali-codes @ujjawaltyagii
public/ @CBID2 @rupali-codes @ujjawaltyagii
.env/ @rupali-codes @ujjawaltyagii @CBID2

## Special cases
# Any changes to the CODEOWNERS file must be approved by @rupali-codes and @CBID2.
# Any changes to the .gitattributes file must be approved by @rupali-codes.
# Any changes to the .gitignore file must be approved by @CBID2.
# Any changes to the CODEOWNERS file must be approved by @rupali-codes @ujjawaltyagii @CBID2.
# Any changes to the .gitattributes file must be approved by @rupali-codes @CBID2 @ujjawaltyagii.
# Any changes to the .gitignore file must be approved by @CBID2 @ujjawaltyagii @rupali-codes.

## Contact information
# If you have any questions about the CODEOWNERS file, please contact @rupali-codes and @CBID2.
# If you have any questions about the CODEOWNERS file, please contact @rupali-codes @ujjawaltyagii @CBID2.
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/category_description.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Category Description 📝
description: Use this to add or update the category's description
title: "[Description] <write which description you want to add or update>"
labels: ["chore", "goal: description"]
body:
- type: input
attributes:
label: Category Name
description: Provide Name of Category
validations:
required: true
- type: input
attributes:
label: Subcategory Name
description: Provide Name of Subctaegory
validations:
required: true
- type: textarea
attributes:
label: New or updated description of above subcategory
validations:
required: true
- type: checkboxes
attributes:
label: Status of Description
options:
- label: "Adding new description"
required: false

- label: "Updating existing description"
required: false
- type: checkboxes
id: no-duplicate-issues
attributes:
label: "Checklist"
options:
- label: "I have checked the existing issues"
required: true

- label: "I have read the [Contributing Guidelines](https://github.com/rupali-codes/LinksHub/blob/main/CONTRIBUTING.md)"
required: true

- label: "I am willing to work on this issue (optional)"
required: false

- label: "I am a GSSoC'23 contributor"
required: false
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: 'Documentation 📋'
description: 'Use this form to present your suggestions on how to improve our docs'
title: '[DOCS] <write your suggestion here>'
labels: ['documenation', 'goal: enhancement']

body:
- type: textarea
id: docs_description
attributes:
label: 'Issue Description'
description: 'Please provide a brief summary of the documentation issue you are experiencing or would like to address.'
validations:
required: true
- type: textarea
id: additional_context_docs
attributes:
label: 'Additional Context'
description: 'If there is any additional context or information that would be helpful for addressing the documentation issue, please provide it here.'

- type: textarea
id: screenshots_examples_docs
attributes:
label: 'Screenshots or Examples (if applicable)'
description: 'Please include relevant screenshots or examples to help illustrate the problem.'

- type: textarea
id: proposed_solution_docs
attributes:
label: 'Proposed Solution (optional)'
description: 'If you have a proposed solution for the documentation issue, please provide it here. This can be helpful for speeding up the resolution process.'

- type: checkboxes
id: terms_checklist_docs
attributes:
label: 'Checklist'
description: 'By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/rupali-codes/LinksHub/blob/main/CODE_OF_CONDUCT.md)'
options:
- label: 'I have checked the existing [issues](https://github.com/rupali-codes/LinksHub/issues?q=is%3Aissue+)'
required: true
- label: 'I have read the [Contributing Guidelines](https://github.com/rupali-codes/LinksHub/blob/main/CONTRIBUTING.md)'
required: true
- label: 'I am willing to work on this issue (optional)'
required: false
- label: "I am a GSSoC'23 contributor"
required: false
- type: markdown
attributes:
value: 'Thank you for taking the time to raise this issue! Your input is greatly appreciated.'
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/refactor_code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Refactor Code 🔧
description: Use this label for code refactoring tasks.
title: '[Refactor] <write what you want to add>'
labels: ['goal: refactor']
body:
- type: input
attributes:
label: File Name
description: 'Enter the file that you want to refactor in the codebase.'
placeholder: 'For example - component/Cards/Card.tsx'
validations:
required: true
- type: textarea
id: refactor_description
attributes:
label: 'Reason for Refactoring the Code'
description: 'Describe what improvements can be made in the codebase without introducing breaking changes.'
validations:
required: true
- type: checkboxes
id: no-duplicate-issues
attributes:
label: 'Checklist'
options:
- label: 'I have checked the existing [issues](https://github.com/rupali-codes/LinksHub/issues).'
required: true

- label: 'I have read the [Contributing Guidelines](https://github.com/rupali-codes/LinksHub/blob/main/CONTRIBUTING.md).'
required: true

- label: "The changes don't break the code and don't introduce new functionality."
required: true

- label: 'I am willing to work on this issue (optional).'
required: false

- label: 'I am a GSSoC23 contributor.'
required: false
10 changes: 7 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
version: 2
updates:
# Update GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
labels:
- 📦 dependencies
directory: '/' # refers to the location of package.json
commit-message:
prefix: 'chore(deps)'
schedule:
interval: "daily"
interval: 'daily'
16 changes: 16 additions & 0 deletions .github/workflows/author-assign-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Author Assign'

on:
pull_request_target:
types: [opened, reopened]

permissions:
pull-requests: write

jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/[email protected]
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}' # GITHUB_TOKEN will be used by default
4 changes: 2 additions & 2 deletions .github/workflows/close_old_issues.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Close Old Issues
on:
schedule:
- cron: "0 0 * * *"
- cron: '0 0 * * *'

jobs:
close-issues:
Expand All @@ -25,7 +25,7 @@ jobs:
days_since_update=$(( ( $(date +%s) - $(date -d "$last_updated" +%s) ) / 86400 ))
if [ $days_since_update -gt 45 ]; then
if [ $days_since_update -gt 30 ]; then
curl -s -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-d '{"state":"closed"}' \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/close_old_prs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Close PRs Without Linked Issues
on:
schedule:
- cron: "0 0 * * *"
- cron: '0 0 * * *'

jobs:
close_prs_without_issue:
Expand All @@ -15,7 +15,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
script: |
const daysThreshold = 45;
const daysThreshold = 30;
const { owner, repo } = context.repo;
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '45 23 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
6 changes: 3 additions & 3 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
welcome:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: EddieHubCommunity/gh-action-community/src/welcome@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Hello ${{ github.actor }}, thanks for opening a issue, your contribution is valuable to us. The maintainers will review this issue and provide feedback as soon as possible."
pr-message: "Hello ${{ github.actor }}, thanks for rising a Pull request, your contribution is valuable to us. The maintainers will review this Pull Request and provide feedback as soon as possible. Keep the great work up!"
issue-message: "Hello ${{ github.actor }}! \n Thank you for raising this issue! 😊 Your contribution is valuable to us! 😊 \n\nPlease make sure to follow our [Contributing Guidelines. 💪🏻](https://github.com/rupali-codes/LinksHub/blob/main/CONTRIBUTING.md) \n\nOur review team will carefully assess the issue and reach out to you soon! 😇 \n We appreciate your patience! "
pr-message: "Thank you, ${{ github.actor }}, for creating this pull request and contributing to LinksHub! 💗\n\n The maintainers will review this Pull Request and provide feedback as soon as possible! 😇\nWe appreciate your patience and contribution, Keep up the great work! 😀"
22 changes: 22 additions & 0 deletions .github/workflows/lock-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Issue Lockdown'

on:
issues:
types: opened

permissions:
issues: write

jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/repo-lockdown@v3 # Reference: https://github.com/dessant/repo-lockdown
with:
close-issue: false
process-only: 'issues'
issue-labels: '🔒 locked'
exclude-issue-labels: '🚀 ready'
skip-closed-issue-comment: true
issue-comment: >
To reduce notifications, issues are locked. Your issue will be unlocked when we add the label, `🚀 ready`.
37 changes: 37 additions & 0 deletions .husky/checkDuplicateLinks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

# Global Flag for duplicates
haveDuplicates=0

# Specify the path to the database folder
databaseFolder="database"

# Get the names of staged JSON files within any folder inside the database folder
stagedFiles=$(git diff --cached --name-only --relative="$databaseFolder" -- "**/*.json")

# Find Duplicates and Print them
for file in $stagedFiles; do

# Read the JSON from staged JSON files
jsonData=$(cat $databaseFolder/$file)

# Get the URLs from the JSON data
urls=$(echo "$jsonData" | sed -n 's/.*"url"\s*:\s*"\([^"]*\)".*/\1/p')

# Get the duplicate URLs from the URLSs list
duplicates=$(echo "$urls" | uniq -d)

# Print duplicate URLs if any
if [[ -n "$duplicates" ]]; then
haveDuplicates=1
echo -e "\nDuplicate url values found in $databaseFolder/$file: \n$duplicates"
fi
done

# Exit the commit process if duplicate URLs found
if [ "$haveDuplicates" -eq 1 ]; then
echo -e "\n[Error] Duplicates URLs found"
exit 1
else
echo -e "\nNo duplicates URLs found"
fi
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

bash .husky/checkDuplicateLinks.sh
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"singleQuote": true,
"tabWidth": 2,
"useTabs": false
}
}
Loading

0 comments on commit da49625

Please sign in to comment.