Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
BagchiShreya committed May 12, 2024
2 parents 31a4729 + 0f3b4eb commit 8cb607a
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 41 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ body:
label: Select program in which you are contributing
multiple: true
options:
- GSSoC24
- IWOC2024
- hacktoberfest
- GSSoC23
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/documentation_bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ body:
label: Select program in which you are contributing
multiple: true
options:
- GSSoC24
- IWOC2024
- hacktoberfest
- GSSoC23
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/game_enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ body:
label: Select program in which you are contributing
multiple: true
options:
- GSSoC24
- IWOC2024
- hacktoberfest
- GSSoC23
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new_game_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ body:
multiple: true
options:
- IWOC2024
- GSSoC24
- hacktoberfest
- GSSoC23
- Other
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/question_and_support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ body:
label: Select program in which you are contributing
multiple: true
options:
- GSSoC24
- IWOC2024
- hacktobefest
- GSSoC23
Expand Down
48 changes: 15 additions & 33 deletions .github/workflows/close_old_issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
node-version: '14'

- name: Install dependencies
run: npm install --prefix .github octokit
run: npm install @actions/github

- name: Fetch opened issues
id: fetch_issues
Expand All @@ -26,36 +26,18 @@ jobs:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
script: |
const oneWeekAgo = new Date();
oneWeekAgo.setDate(oneWeekAgo.getDate() - 3);
let allIssues = [];
let page = 1;
let stopFetching = false;
while (!stopFetching) {
const { data: issues } = await github.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
sort: 'created',
direction: 'asc',
per_page: 100,
page
});
for (const issue of issues) {
if (issue.pull_request === undefined && new Date(issue.created_at) < oneWeekAgo) {
allIssues.push(issue);
} else {
stopFetching = true;
break;
}
}
page++;
}
const olderIssues = allIssues.filter(issue => issue.pull_request === undefined);
oneWeekAgo.setDate(oneWeekAgo.getDate() - 7);
const { data: issues } = await github.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
sort: 'created',
direction: 'asc',
per_page: 100
});
const olderIssues = issues.filter(issue => issue.pull_request === undefined && new Date(issue.created_at) < oneWeekAgo);
core.setOutput('older_issues', olderIssues.map(issue => issue.number).join(','));
- name: Close older issues and comment
Expand All @@ -64,7 +46,7 @@ jobs:
with:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
script: |
const olderIssueNumbers = Buffer.from('${{ steps.fetch_issues.outputs.older_issues }}', 'utf-8').toString().split(',');
const olderIssueNumbers = '${{ steps.fetch_issues.outputs.older_issues }}'.split(',');
for (const issueNumber of olderIssueNumbers) {
// Get the issue details
Expand All @@ -87,7 +69,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: parseInt(issueNumber),
body: `Hello @${issue.user.login}, Time's Uppp!⏰ \n Sorry for closing your issue! \n But it's more than a week since we haven't received anything from your side 😢 . \n Come up with new ideas, create a new issue and make sure you finish it within a week! 🔥 \n All the best! 🚀 \n Happy Hacking! 💗`
body: `Hello @${issue.user.login}, Time's up!⏰ \n Sorry for closing your issue! \n But it's more than a week since we haven't received anything from your side 😢 . \n Come up with new ideas, create a new issue and make sure you finish it within a week! 🔥 \n All the best! 🚀 \n Happy Hacking! 💗`
});
console.log(`Closed and commented on issue #${issueNumber}.`);
Expand Down
32 changes: 28 additions & 4 deletions .github/workflows/greet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,42 @@ jobs:
issue_number: number,
body: commentBody
});
- name: Add label if issue body contains "GSSoC24"
id: check_label_gs_soc24
run: |
if grep -qE "GSSoC24" <<< "${{ github.event.issue.body }}"; then
echo "::set-output name=add_label_gs_soc24::true"
else
echo "::set-output name=add_label_gs_soc24::false"
fi
- name: Add label "GSSoC24"
if: ${{ steps.check_label_gs_soc24.outputs.add_label_gs_soc24 == 'true' }}
uses: actions/github-script@v4
with:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
script: |
const { owner, repo, number } = context.issue;
await github.issues.addLabels({
owner: owner,
repo: repo,
issue_number: number,
labels: ["gssoc"]
});
- name: Add label if issue body contains "GSSoC23"
id: check_label_gs_soc
id: check_label_gs_soc23
run: |
if grep -qE "GSSoC23" <<< "${{ github.event.issue.body }}"; then
echo "::set-output name=add_label_gs_soc::true"
echo "::set-output name=add_label_gs_soc23::true"
else
echo "::set-output name=add_label_gs_soc::false"
echo "::set-output name=add_label_gs_soc23::false"
fi
- name: Add label "GSSoC23"
if: ${{ steps.check_label_gs_soc.outputs.add_label_gs_soc == 'true' }}
if: ${{ steps.check_label_gs_soc23.outputs.add_label_gs_soc23 == 'true' }}
uses: actions/github-script@v4
with:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2473,7 +2473,6 @@ textarea.form-input::-webkit-resizer {
color: var(--white-1);
justify-content: center;
align-items: center;
margin-top: 5rem;
width: 100%;
gap: 2rem;
}
Expand Down Expand Up @@ -2512,6 +2511,7 @@ textarea.form-input::-webkit-resizer {
flex-wrap: wrap;
margin-right: 5px;
gap: 5px;
padding-top: 0%;
}

/* pagination styling */
Expand Down Expand Up @@ -2617,8 +2617,8 @@ textarea.form-input::-webkit-resizer {
height: auto;
text-align: center;
color: snow;
padding-bottom: 6%;
padding-top: 3%;
padding-bottom: 40%;
padding-top: 10%;
}

span {
Expand Down Expand Up @@ -2844,4 +2844,4 @@ box-shadow: 0px 0px 21px 0px rgba(204,153,255,1); */
background: linear-gradient(343deg, rgba(120, 47, 152, 1) 0%, rgba(5, 50, 129, 1) 82%, rgba(52, 39, 100, 1) 100%);
filter: blur(600px);
z-index: -10;
}
}

0 comments on commit 8cb607a

Please sign in to comment.