Skip to content

Commit 752ebd8

Browse files
committed
new year
1 parent 95a6ebb commit 752ebd8

3 files changed

Lines changed: 27 additions & 15 deletions

File tree

.github/workflows/contributors.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@ name: Credit the contributors
33
on:
44
workflow_dispatch: {}
55
schedule:
6-
- cron: "0 0 1 * *"
6+
- cron: "0 0 1 * *" # Run at midnight on the first of every month
77

88
env:
99
ORGANIZATION_NAME: "CodeWithAloha"
10+
# This is a list of repositories that you want to gather contributors from
11+
# To add a new repository, add a new line with the repository name in quotes
1012
REPOSITORY_NAMES: |
1113
(
1214
"Hawaii-Zoning-Atlas"
1315
"HIERR"
14-
"CWAWebsite"
16+
"website"
17+
"uipa"
1518
)
1619
jobs:
1720
gather-the-contributors:
@@ -29,14 +32,23 @@ jobs:
2932
echo " \"$item\": " >> contributors.json
3033
3134
contributors=$(curl -s -H "Accept: application/vnd.github+json" https://api.github.com/repos/${{ env.ORGANIZATION_NAME }}/$item/contributors | jq -r '.[] | {username: .login, avatar_url: .avatar_url, url: .html_url }' | jq -s .)
32-
for contributor in $contributors
33-
do
34-
35-
echo $contributor >> contributors.json
36-
# " {\"name\": \"$contributor\"},"
35+
collaborators=$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.CWA_BOT_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/repos/${{ env.ORGANIZATION_NAME }}/$item/collaborators?per_page=100" | jq -r '.[].login')
36+
37+
echo $contributors > copy_contributors.json
3738
39+
# Filter for only the contributors that are also collaborators
40+
jq -c '.[]' copy_contributors.json | while read i; do
41+
username=$(echo $i | jq -r '.username')
42+
if [[ " ${collaborators[@]} " =~ "${username}" ]]; then
43+
echo $i | jq -c . >> filtered_contributors.json
44+
fi
3845
done
46+
47+
echo $(jq -s . filtered_contributors.json) >> contributors.json
48+
3949
sed -i '$ s/.$//' contributors.json
50+
rm copy_contributors.json
51+
rm filtered_contributors.json
4052
echo " ]," >> contributors.json
4153
done
4254
sed -i '$ s/.$//' contributors.json

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Code with Aloha Website
1+
# Code With Aloha's Website
22

3-
**Code with Aloha** is a group of civic-minded tech enthusiasts. This site is a testament to our dedication towards community improvement through technology.
3+
**Code With Aloha** is a group of civic-minded tech enthusiasts. This site is a testament to our dedication towards community improvement through technology.
44

5-
![Screenshot 2023-09-10 120435](https://github.com/CodeWithAloha/CWAWebsite/assets/113944962/f32b6d02-037c-4d23-910b-83a21fd2ab38)
5+
![Screenshot 2023-09-10 120435](https://github.com/CodeWithAloha/website/assets/113944962/f32b6d02-037c-4d23-910b-83a21fd2ab38)
66

7-
:computer: **Live Site** [here](https://codewithaloha.github.io/CWAWebsite/).
7+
:computer: **Live Site** [here](https://codewithaloha.github.io/website/).
88

99
:books: **Features** of our project include a dynamic and responsive user interface powered by NextJS & React, stylish components with Tailwind CSS, and smooth animations and transitions through Framer Motion to enhance the user experience.
1010

@@ -16,13 +16,13 @@ To contribute to this project, follow these steps:
1616
**2. Clone Your Fork**: Now, you need to clone your forked repository to your local machine. Replace [your-username] with your GitHub username in the URL below:
1717

1818
```Node
19-
git clone https://github.com/[your-username]/CWAWebsite.git
19+
git clone https://github.com/[your-username]/website.git
2020
```
2121

2222
**3. Navigate to the project directory**:
2323

2424
```Node
25-
cd CWAWebsite
25+
cd website
2626
```
2727

2828
**4. Install the dependencies**:
@@ -51,4 +51,4 @@ This project is licensed under the MIT License.
5151

5252
:speech_balloon: **Contact**
5353

54-
For inquiries and feedback, please reach out to [codewithaloha@gmail.com](mailto:your-email@email.com).
54+
For inquiries and feedback, please reach out to [codewithaloha@gmail.com](mailto:codewithaloha@gmail.com).

contributors.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
"url": "https://github.com/lprimiano"
120120
}
121121
],
122-
"CWAWebsite": [
122+
"website": [
123123
{
124124
"username": "kobebuckley",
125125
"avatar_url": "https://avatars.githubusercontent.com/u/42805189?v=4",

0 commit comments

Comments
 (0)