Skip to content

Commit aadcb1b

Browse files
Merge branch 'main' into enhancement/testimonial
2 parents 8b4022f + 4fd70b6 commit aadcb1b

29 files changed

+477
-195
lines changed

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ body:
99
label: Description
1010
description: A clear and concise description of any alternative solution or features you've considered.
1111
validations:
12-
required:
12+
required: true
1313
- type: textarea
1414
id: screenshots
1515
attributes:
@@ -24,7 +24,7 @@ body:
2424
description: Add any other context or anything else about this idea
2525
validations:
2626
required: false
27-
- type: checkboxes
27+
- type: checkboxes
2828
id: terms
2929
attributes:
3030
label: Code of Conduct

.github/ISSUE_TEMPLATE/style.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "Style Changing Request"
2-
description: "Suggest a style designs"
2+
description: "Suggest style designs"
33
title: "[style]: "
44
labels: ["style"]
55
body:
@@ -12,14 +12,14 @@ body:
1212
attributes:
1313
label: What's the style idea?
1414
placeholder: Add descriptions
15-
value: "We need to improve "
15+
value: "We need to improve "
1616
validations:
1717
required: true
1818
- type: textarea
1919
id: screenshots
2020
attributes:
2121
label: Add screenshots
22-
description: Add screenshots to see the demo
22+
description: Add screenshots to showcase the style
2323
placeholder: Add screenshots
2424
value: "Add screenshots"
2525
- type: checkboxes
@@ -29,12 +29,10 @@ body:
2929
description: By submitting this issue, you agree to follow our Code of Conduct
3030
options:
3131
- label: "I agree to follow this project's Code of Conduct"
32-
33-
- type: checkboxes
32+
- type: checkboxes
3433
id: gssoc
3534
attributes:
36-
label: gssoc23
35+
label: GSSoC'23
3736
description: "This is for GSSoC'23 contributors only."
3837
options:
39-
- label: "I am a GSSOC'23 Contributor."
40-
38+
- label: "I am a GSSoC'23 Contributor."
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Close Old Issues
3+
on:
4+
schedule:
5+
- cron: 0 0 * * *
6+
jobs:
7+
close-issues:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Repository
11+
uses: actions/checkout@v3
12+
- name: Close Old Issues
13+
run: >
14+
open_issues=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}"
15+
\
16+
"https://api.github.com/repos/${{ github.repository }}/issues?state=open" \
17+
| jq -r '.[] | .number')
18+
for issue in $open_issues; do
19+
# Get the last updated timestamp of the issue
20+
last_updated=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
21+
"https://api.github.com/repos/${{ github.repository }}/issues/$issue" \
22+
| jq -r '.updated_at')
23+
days_since_update=$(( ( $(date +%s) - $(date -d "$last_updated" +%s) ) / 86400 ))
24+
if [ $days_since_update -gt 20 ]; then # Modify the condition to check if days_since_update is greater than 20
25+
curl -s -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
26+
-H "Accept: application/vnd.github.v3+json" \
27+
-d '{"state":"closed"}' \
28+
"https://api.github.com/repos/${{ github.repository }}/issues/$issue"
29+
fi
30+
done

.github/workflows/issues.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Add Comment to Newly Open Issue
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
jobs:
8+
add-comment:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
- name: Add Comment
16+
uses: actions/github-script@v4
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}
19+
script: >
20+
const { issue } = context.payload;
21+
22+
const author = issue.user.login;
23+
24+
const issueNumber = issue.number;
25+
26+
const comment = `Hello @${author}! \n Thank you for raising this issue. \nPlease make sure to follow our [Contributing Guidelines.](https://github.com/devs-in-tech/DevsInTech/blob/main/CONTRIBUTING.md) \nDon't forget to ⭐ our [DevsInTech](https://github.com/devs-in-tech/DevsInTech)\n\nOur review team will carefully assess the issue and reach out to you soon!\n We appreciate your patience!`;
27+
28+
const { owner, repo } = context.repo;
29+
30+
await github.issues.createComment({
31+
owner: owner,
32+
repo: repo,
33+
issue_number: issueNumber,
34+
body: comment
35+
});
36+
37+
console.log(`Comment added to the Issue #${issueNumber}.`);

.github/workflows/lock.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 'Issue Lockdown'
2+
3+
on:
4+
issues:
5+
types: opened
6+
7+
permissions:
8+
issues: write
9+
10+
jobs:
11+
action:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: dessant/repo-lockdown@v3 # Reference: https://github.com/dessant/repo-lockdown
15+
with:
16+
close-issue: false
17+
process-only: 'issues'
18+
issue-labels: 'gssoc23'
19+
exclude-issue-labels: '🚀 ready'
20+
skip-closed-issue-comment: true
21+
issue-comment: >
22+
To reduce notifications, issues are locked. Your issue will be unlocked when we add the label, `🚀 ready`.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Close Issue if Opener has Opened Issues
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
8+
jobs:
9+
close_issue:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check if opener has multiple open issues
14+
id: check_open_issues
15+
uses: actions/github-script@v4
16+
with:
17+
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
18+
script: |
19+
const owner = context.repo.owner;
20+
const repo = context.repo.repo;
21+
const issueNumber = context.issue.number;
22+
const issueOpener = context.payload.issue.user.login;
23+
const previousIssuesResponse = await github.request('GET /repos/{owner}/{repo}/issues', {
24+
owner,
25+
repo,
26+
state: 'open',
27+
creator: issueOpener
28+
});
29+
const previousOpenIssues = previousIssuesResponse.data.filter(issue => issue.number !== issueNumber && !issue.pull_request);
30+
const previousOpenIssueNumbers = previousOpenIssues.map(issue => `#${issue.number}`);
31+
const openerName = context.payload.issue.user.login;
32+
const closeIssue = previousOpenIssues.length > 0;
33+
console.log(`Close issue: ${closeIssue}`);
34+
if (closeIssue) {
35+
const comment = `Hey @${openerName} , You can't have another issue before completing the previous one 😀 \n you already have the following ${previousOpenIssues.length} open issues 👀 ! :\n\n${previousOpenIssueNumbers.join('\n')}`;
36+
core.exportVariable('comment_body', comment); // Export the variable
37+
core.setOutput('close_issue', true);
38+
} else {
39+
core.exportVariable('comment_body', '');
40+
core.setOutput('close_issue', false);
41+
}
42+
- name: Close the issue and add a comment
43+
if: always() && ${{ needs.check_open_issues.outputs.close_issue }}
44+
uses: actions/github-script@v4
45+
with:
46+
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
47+
script: |
48+
const owner = context.repo.owner;
49+
const repo = context.repo.repo;
50+
const issueNumber = context.issue.number;
51+
const comment = process.env.comment_body; // Retrieve the exported variable
52+
53+
if (comment.trim() === '') {
54+
console.log('Comment body is empty. Skipping comment creation.');
55+
return;
56+
}
57+
const closeComment = `${comment}`;
58+
await github.issues.createComment({
59+
owner,
60+
repo,
61+
issue_number: issueNumber,
62+
body: closeComment
63+
});
64+
await github.issues.update({
65+
owner,
66+
repo,
67+
issue_number: issueNumber,
68+
state: 'closed'
69+
});

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ typings/
7171
# dotenv environment variables file
7272
.env
7373
.env.test
74+
.env.local
7475

7576
# parcel-bundler cache (https://parceljs.org/)
7677
.cache

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ DevsInTech offers a wide range of resources and opportunities for developers and
5454
>
5555
> - Before getting into it, make sure you have [pnpm](https://nodejs.org/download) installed.
5656
57-
5857
### Let's jump right in🌟
5958

6059
1. Fork the project
@@ -114,19 +113,17 @@ DevsInTech offers a wide range of resources and opportunities for developers and
114113
115114
### Setup using Docker
116115
117-
* Enter the root directory
116+
- Enter the root directory
118117
119-
```sh
120-
docker build .
118+
```sh
119+
docker build .
121120
122-
```
121+
```
123122
124-
125-
```sh
126-
docker run -p 3000:80 <Image>
127-
```
123+
```sh
124+
docker run -p 3000:80 <Image>
125+
```
128126
129-
130127
# Contribute
131128
132129
We welcome contributions in our community. Learn how to start contributing, from installing the project on your device to submitting a pull request with our<Link href="https://github.com/devs-in-tech/DevsInTech/blob/main/CONTRIBUTING.md"> Contribution guide.<Link/>

next.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
reactStrictMode: true,
4+
images: {
5+
domains:['avatars.githubusercontent.com'],
6+
}
47
};
58

69
module.exports = nextConfig;

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@
1515
"prepare": "husky install"
1616
},
1717
"dependencies": {
18+
"@alan-ai/alan-sdk-web": "^1.8.48",
1819
"@commitlint/cli": "^17.6.6",
1920
"@commitlint/config-conventional": "^17.6.6",
2021
"autoprefixer": "10.4.14",
2122
"axios": "^1.4.0",
2223
"eslint": "8.44.0",
23-
"eslint-config-next": "13.4.8",
24+
"eslint-config-next": "13.4.12",
2425
"framer-motion": "^10.12.18",
2526
"husky": "^8.0.3",
2627
"next": "13.4.8",
27-
"pnpm": "^8.6.6",
28+
"pnpm": "^8.6.10",
2829
"postcss": "8.4.24",
2930
"react": "18.2.0",
3031
"react-dom": "18.2.0",
@@ -34,6 +35,6 @@
3435
"tailwindcss": "3.3.2"
3536
},
3637
"devDependencies": {
37-
"prettier": "2.8.8"
38+
"prettier": "3.0.0"
3839
}
39-
}
40+
}

0 commit comments

Comments
 (0)