Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
64 changes: 64 additions & 0 deletions .github/scripts/check_pr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import subprocess, re, datetime, sys

def sh(cmd):
return subprocess.run(cmd, shell=True, capture_output=True, text=True).stdout.strip()

changed = sh("git diff --name-only origin/main...HEAD").splitlines()

results = []
ok = True

def check(name, passed, detail=""):
global ok
ok = ok and passed
results.append(f"- {'✅' if passed else '❌'} {name}" + (f": {detail}" if detail else ""))

# 1. only README + one new image file changed
img_ext = (".png", ".jpg", ".jpeg", ".gif")
non_readme_img = [f for f in changed if f != "README.md" and not f.lower().endswith(img_ext)]
check("No other git changes", len(non_readme_img) == 0, ", ".join(non_readme_img))

imgs = [f for f in changed if f.lower().endswith(img_ext)]
check("Exactly one new image added", len(imgs) == 1, str(imgs))

# 2. README diff: exactly one line added, none removed
readme_diff = sh("git diff origin/main...HEAD -- README.md")
added = [l for l in readme_diff.splitlines() if l.startswith("+") and not l.startswith("+++")]
removed = [l for l in readme_diff.splitlines() if l.startswith("-") and not l.startswith("---")]
check("Only one line added to README, none removed", len(added) == 1 and len(removed) == 0,
f"{len(added)} added, {len(removed)} removed")

# 3. valid markdown — new line should be an image embed referencing the new file
if added and imgs:
line = added[0][1:].strip()
check("New README line is a valid image embed matching the new file",
bool(re.search(re.escape(imgs[0].split("/")[-1]), line)) and line.startswith("!["),
line)
elif added:
check("New README line is a valid image embed matching the new file", False, "no image file found")

# 4. image lives in <Year>/<Month Name>/ folder, current month (1-day forgiveness)
MONTHS = ["January","February","March","April","May","June","July",
"August","September","October","November","December"]

if imgs:
p = imgs[0]
parts = p.split("/")
today = datetime.date.today()
valid = {(str(today.year), MONTHS[today.month - 1])}
if today.day == 1:
prev = today.replace(day=1) - datetime.timedelta(days=1)
valid.add((str(prev.year), MONTHS[prev.month - 1]))
if len(parts) >= 3:
year, month = parts[0], parts[1]
check("Image is in correct Year/Month folder (or forgiven)",
(year, month) in valid, f"found {year}/{month}, expected one of {valid}")
else:
check("Image is inside a Year/Month folder", False, p)

with open("comment.md", "w") as f:
f.write("## Dino PR Check Results\n\n")
f.write("\n".join(results))
f.write(f"\n\n**Overall: {'✅ All checks passed' if ok else '❌ Some checks failed'}**")

sys.exit(0 if ok else 1)zzz
18 changes: 18 additions & 0 deletions .github/workflows/check_dino_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: check and sort PRs
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run a one-line script
run: echo Hello, world!
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
Empty file added 2015/April/.gitkeep
Empty file.
8 changes: 8 additions & 0 deletions 2015/April/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Mesozoic Era -- April, 2015, Edition -- Dino Compilation

"party orpheus"

![](party_orpheus.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
Empty file added 2015/August/.gitkeep
Empty file.
Empty file added 2015/December/.gitkeep
Empty file.
17 changes: 17 additions & 0 deletions 2015/December/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Mesozoic Era -- December, 2015, Edition -- Dino Compilation

"dinosaur trying to contribute to open source but can't because its arms are too
short"

![](contributing_dinosaur.png)

"i have failed"

![](i_have_failed.png)

"handstand"

![](handstand.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
File renamed without changes
File renamed without changes
Empty file added 2015/February/.gitkeep
Empty file.
12 changes: 12 additions & 0 deletions 2015/February/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Mesozoic Era -- February, 2015, Edition -- Dino Compilation

"dino teaching"

![](dino_teaching.png)

"dino handing docs"

![](dino_handing_docs.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
File renamed without changes
Empty file added 2015/January/.gitkeep
Empty file.
25 changes: 25 additions & 0 deletions 2015/January/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Mesozoic Era -- January, 2015, Edition -- Dino Compilation

"club dinosaur"

![](club_dinosaur.png)

"a smart dinosaur reading docs"

![](smart_dinosaur_docs.png)

"a dinosaur trying, but failing to get money"

![](money_dinosaur_1.png)
![](money_dinosaur_2.png)

"a dinosaur stealing food from a restaurant"

![](restaurant_dinosaur.png)

"dinosaur doing code stuff"

![](code_dinosaur.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Empty file added 2015/July/.gitkeep
Empty file.
Empty file added 2015/June/.gitkeep
Empty file.
9 changes: 9 additions & 0 deletions 2015/June/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Mesozoic Era -- June, 2015, Edition -- Dino Compilation

"two dinosaurs stacked underneath a trench coat pretending to be a classic
human. top dinosaur is prophet orpheus about to hit up the club"

![](undercover_dinosaurs.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
Empty file added 2015/March/.gitkeep
Empty file.
Empty file added 2015/May/.gitkeep
Empty file.
9 changes: 9 additions & 0 deletions 2015/May/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Mesozoic Era -- May, 2015, Edition -- Dino Compilation


"dino winning"

![](dino_winning.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
Empty file added 2015/November/.gitkeep
Empty file.
Empty file added 2015/October/.gitkeep
Empty file.
24 changes: 24 additions & 0 deletions 2015/October/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Mesozoic Era -- October, 2015, Edition -- Dino Compilation

"confused dino"

![](confused_dinosaur.png)

"dinosaur coming from the future to destroy humanity"

![](dinosaur_coming_from_the_future_to_destroy_humanity.png)

"dino sealing letters"

![](dinosaur_sealing_letters_with_wax.png)

"dino waving hello"

![](dinosaur_waving.png)

"dinosaur starting a dino-as-a-service start-up"

![](dinosaur_logo.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Empty file added 2015/September/.gitkeep
Empty file.
Empty file added 2017/April/.gitkeep
Empty file.
Empty file added 2017/August/.gitkeep
Empty file.
Empty file added 2017/December/.gitkeep
Empty file.
Empty file added 2017/February/.gitkeep
Empty file.
12 changes: 12 additions & 0 deletions 2017/February/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Mesozoic Era -- February, 2017, Edition -- Dino Compilation

"you promised me answers duck"

![](dinosaur_holding_rubber_duck.png)

"dinosaur dressing up as a teenage mutant ninja turtle"

![](dinosaur_ninja.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
Empty file added 2017/January/.gitkeep
Empty file.
Empty file added 2017/July/.gitkeep
Empty file.
Empty file added 2017/June/.gitkeep
Empty file.
Empty file added 2017/March/.gitkeep
Empty file.
8 changes: 8 additions & 0 deletions 2017/March/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Mesozoic Era -- March, 2017, Edition -- Dino Compilation

"dinosaur sweating bullets"

![](dinosaur_sweating_bullets.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
Empty file added 2017/May/.gitkeep
Empty file.
Empty file added 2017/November/.gitkeep
Empty file.
Empty file added 2017/October/.gitkeep
Empty file.
File renamed without changes
8 changes: 8 additions & 0 deletions 2017/October/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Mesozoic Era -- October, 2017, Edition -- Dino Compilation

"8-bit"

![](8-bit_dino.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
Empty file added 2017/September/.gitkeep
Empty file.
Empty file added 2018/April/.gitkeep
Empty file.
Empty file added 2018/August/.gitkeep
Empty file.
Empty file added 2018/December/.gitkeep
Empty file.
8 changes: 8 additions & 0 deletions 2018/December/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Mesozoic Era -- December, 2018, Edition -- Dino Compilation

"a dinosaur motivating someone"

![](motivational_dinosaur.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
Empty file added 2018/February/.gitkeep
Empty file.
Empty file added 2018/January/.gitkeep
Empty file.
Empty file added 2018/July/.gitkeep
Empty file.
Empty file added 2018/June/.gitkeep
Empty file.
Empty file added 2018/March/.gitkeep
Empty file.
Empty file added 2018/May/.gitkeep
Empty file.
Empty file added 2018/November/.gitkeep
Empty file.
Empty file added 2018/October/.gitkeep
Empty file.
Empty file added 2018/September/.gitkeep
Empty file.
Empty file added 2019/April/.gitkeep
Empty file.
Empty file added 2019/August/.gitkeep
Empty file.
Empty file added 2019/December/.gitkeep
Empty file.
36 changes: 36 additions & 0 deletions 2019/December/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Mesozoic Era -- December, 2019, Edition -- Dino Compilation

"confuzzled dino"

![](confuzzled-dino.png)

"pirate-dino"

![](pirate-dino.png)

"oopheus"

![](oopheus.png)

"andrewgcodes-bunnydino"

![](andrewgcodes-bunnydino.png)

"harry dino"

![](harry-dino.png)

"pokerface dino"

![](poker-face-dino.jpg)

"iamcpdev-mama-orpheus-and-smol-orpheus"

![](iamcpdev-mama-orpheus-and-smol-orpheus.png)

"dinosaur coding on an ipad"

![](ipad_dino.JPG)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Empty file added 2019/February/.gitkeep
Empty file.
Empty file added 2019/January/.gitkeep
Empty file.
Empty file added 2019/July/.gitkeep
Empty file.
Empty file added 2019/June/.gitkeep
Empty file.
Empty file added 2019/March/.gitkeep
Empty file.
8 changes: 8 additions & 0 deletions 2019/March/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Mesozoic Era -- March, 2019, Edition -- Dino Compilation

"birthday dino"

![](birthday_dino.jpg)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
Empty file added 2019/May/.gitkeep
Empty file.
Empty file added 2019/November/.gitkeep
Empty file.
File renamed without changes
14 changes: 14 additions & 0 deletions 2019/November/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Mesozoic Era -- November, 2019, Edition -- Dino Compilation

![](Dinos.jpg)

"dino drawing a dino

![](drawing-dino.png)

"nervous dino"

![](nervous_dino.gif)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
File renamed without changes
Empty file added 2019/October/.gitkeep
Empty file.
File renamed without changes
24 changes: 24 additions & 0 deletions 2019/October/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Mesozoic Era -- October, 2019, Edition -- Dino Compilation

"dinosaur trying to draw a dinosaur"

![](jspaint-dino.png)

"Old Dino"

![](<Ancient Orpheus.png>)

"reddit dino"

![](reddit-dino.png)

"at the arcade"

![](arcade_dino.png)

"leaping dino"

![](leaping_dino.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Empty file added 2019/September/.gitkeep
Empty file.
8 changes: 8 additions & 0 deletions 2019/September/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Mesozoic Era -- September, 2019, Edition -- Dino Compilation

"cake dino"

![](cake_dino.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
File renamed without changes
Empty file added 2020/April/.gitkeep
Empty file.
File renamed without changes
12 changes: 12 additions & 0 deletions 2020/April/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Mesozoic Era -- April, 2020, Edition -- Dino Compilation

"Orpheus Skellington"

![](Orpheus%20Skellington.jpg)

"vitruvian dino"

![](vitruvian-dino.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
Empty file added 2020/August/.gitkeep
Empty file.
File renamed without changes
File renamed without changes
File renamed without changes
48 changes: 48 additions & 0 deletions 2020/August/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Mesozoic Era -- August, 2020, Edition -- Dino Compilation

"dino from the office"

![](orpheus-ms.png)

"winstoniskandar_dino"

![](winstoniskandar_dino.png)

"starptr_dino"

![](starptr_dino.png)

"kayleyseow_OrpheusAndHearts"

![](kayleyseow_OrpheusAndHearts.png)

"Blushing dino with a hairdo and necklace"

![](smarter23_blushing_dino.png)

"arekminajj_smart_dino"

![](arekminajj_smart_dino.png)

"Garrett's Bucktooth Dinosaur"

![](garrett_lane_bucktooth_dino.png)

"naseeb_dino"

![](naseeb_dino.png)

"AkhilGKrishnan_dino"

![](AkhilGKrishnan_dino.png)

"Fogeinator_dino"

![](Fogeinator_dino.png)

"ImJustChew_saddino"

![](ImJustChew_saddino.png)

---
### _Need help? Ask a question in the [slack channel](https://hackclub.enterprise.slack.com/archives/C0B0XQHPNSW)._
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Empty file added 2020/December/.gitkeep
Empty file.
File renamed without changes
File renamed without changes
Loading