Skip to content

Commit fd03c44

Browse files
authored
Merge pull request #46 from brainhack-vandy/david-fixed-action-template-projectyear
removed project action commits to main, fixed template text and project year
2 parents c86089b + 7c274e1 commit fd03c44

File tree

3 files changed

+28
-33
lines changed

3 files changed

+28
-33
lines changed

.github/ISSUE_TEMPLATE/project-submission-template.yml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,26 @@ body:
1616
value: |
1717
## Guidelines
1818
19-
We are very excited to meet you at Brainhack Global 2024 🎉.
19+
We are very excited to meet you at BrainHack Vanderbilt 2025 🎉.
2020
2121
To submit a project:
2222
23-
- register to the most suitable [Brainhack Global 2024 events](https://brainhack.org/global2024/events/) for your location, time zone, interest...
23+
- register for [BrainHack Vanderbilt 2025](https://brainhack-vandy.github.io/)
2424
25-
- make sure you have read our **[Guidelines for Leading and Attending to Brainhack Projects](https://github.com/brainhackorg/bhg-event-materials/blob/master/docs/leading_and_attending_to_brainhack_projects.md)** to increase the diversity and inclusivity of your project work
26-
27-
- fill in all the required items (marked with a red asterisk `*`) in the form below. Note that if you are missing some information but still want to submit a project, you can always input dummy content.
25+
- fill in all the required items (marked with a red asterisk `*`) in the form below. Note that if you are missing some information but still want to submit a project, you can always input placeholder content.
2826
2927
- click on `Submit new issue` at the bottom of the form
3028
3129
- add a comment saying:
32-
> Hi @brainhackorg/project-monitors my project is ready!
30+
> Hi @brainhack-vandy/project-monitors my project is ready!
3331
3432
After the issue is submitted, we will assign a `project monitor` to review your submission.
3533
36-
After approval we will add the label `status:web_ready` and your project will appear on [our Projects page](https://brainhack.org/global2024/projects).
34+
After approval we will add the label `approved` and your project will appear on [our Projects page](https://brainhack-vandy.github.io/#/projects).
3735
3836
Note that you can always update your issue after clicking on `Submit new issue`. This will also change your page on the website accordingly.
3937
40-
If at any time you need help from us or anything is unclear, please ping the project monitors (`@brainhackorg/project-monitors`) in a comment. Our team is here to help!
38+
If at any time you need help from us or anything is unclear, please ping the project monitors (`@brainhack-vandy/project-monitors`) in a comment. Our team is here to help!
4139
4240
# ----------------------------------------------------------------------------
4341
# PROJECT INFO
@@ -55,7 +53,7 @@ body:
5553
- type: textarea
5654
attributes:
5755
label: Title
58-
description: Add a title to describe your project.
56+
description: Add a longer title to describe your project.
5957
validations:
6058
required: true
6159

@@ -76,19 +74,7 @@ body:
7674
validations:
7775
required: false
7876

79-
- type: dropdown
80-
attributes:
81-
description: Brainhack Global event you registered for. Several options are
82-
possible.
83-
label: Brainhack Global 2024 Event
84-
multiple: true
85-
options:
86-
- Brainhack Aus
87-
- Brainhack Donostia
88-
- Brainhack Lucca
89-
- Brainhack Marseille
90-
validations:
91-
required: true
77+
9278

9379
- type: textarea
9480
attributes:
@@ -395,6 +381,6 @@ body:
395381
attributes:
396382
label: Things to do after the project is submitted and ready to review.
397383
options:
398-
- label: 'Add a comment below the main post of your issue saying: `Hi @brainhackorg/project-monitors
384+
- label: 'Add a comment below the main post of your issue saying: `Hi @brainhack-vandy/project-monitors
399385
my project is ready!`'
400386
- label: Twitter-sized summary of your project pitch.

.github/workflows/update-projects.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: Update Issues and Deploy
22

33
on:
44
issues:
5-
types: [opened, edited, deleted]
6-
schedule:
7-
- cron: '0 * * * *' # Every hour
5+
types: [opened, edited, deleted, closed, labeled]
86

97
permissions:
108
contents: write
@@ -28,13 +26,10 @@ jobs:
2826
"https://api.github.com/repos/${{ github.repository }}/issues?state=open" \
2927
> src/data/issues.json
3028
31-
- name: Commit Changes
29+
- name: Add Github Info
3230
run: |
3331
git config --local user.email "[email protected]"
3432
git config --local user.name "GitHub Action"
35-
git add src/data/issues.json
36-
git commit -m "Update issues data" || echo "No changes to commit"
37-
git push
3833
3934
- name: Install Dependencies
4035
run: npm install

src/data/data_utils.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
import issues from "./issues.json"
22

33
function processIssues(issues) {
4-
const projects = [];
4+
const projects = {
5+
2024: [],
6+
2025: [],
7+
};
58
issues.forEach((issue) => {
69
// Check if the issue has the "approved" label
710
const hasApprovedLabel = issue.labels.some(
811
(label) => label.name === 'approved'
912
);
1013
if (!hasApprovedLabel) {
11-
return; // Skip this issue if it's not approved
14+
return;
15+
}
16+
17+
let yearLabel = null;
18+
issue.labels.forEach
19+
((label) => {
20+
if (label.name === '2024' || label.name === '2025') {
21+
yearLabel = parseInt(label.name, 10);
22+
}
23+
});
24+
if (!yearLabel) {
25+
return;
1226
}
1327

1428
const title = issue.title;
@@ -48,7 +62,7 @@ function processIssues(issues) {
4862
imgPath: imageLink,
4963
};
5064

51-
projects.push(project);
65+
projects[yearLabel].push(project);
5266
});
5367
console.log(projects);
5468
return projects;

0 commit comments

Comments
 (0)