An open API service indexing awesome lists of open source software.

https://github.com/gojiplus/ycombo

ycombo: Post a Random GitHub Repo to Hacker News
https://github.com/gojiplus/ycombo

github hacker-news ycombinator

Last synced: 2 months ago
JSON representation

ycombo: Post a Random GitHub Repo to Hacker News

Awesome Lists containing this project

README

        

# 🚀 ycombo: Post a Random GitHub Repo. to Hacker News

This GitHub Action picks a random public repo from your GitHub profile (or orgs) and submits it to [Hacker News](https://news.ycombinator.com/submit) via a headless browser using your session cookie.

Perfect for passive social proof, open-source visibility, or quietly testing demand.

---

## ✨ Features

- Picks repos from your GitHub username and any orgs you specify
- Filters to repos with ≥5 stars
- Generates a `Show HN: {repo}` title
- Submits to Hacker News using Playwright and your HN session cookie

---

## 🔧 Setup

### 1. Secrets
Add the following GitHub Action secrets:

| Name | Description |
|-----------------|----------------------------------------------|
| `HN_USER_COOKIE` | Your `user` session cookie from Hacker News |

### 2. Example workflow

```yaml
name: Post to HN

on:
schedule:
- cron: '0 17 * * 1' # every Monday
workflow_dispatch:

jobs:
post:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/post-to-hn
with:
github-username: soodoku
github-orgs: appeler,recite,gojiplus
hn-cookie: ${{ secrets.HN_USER_COOKIE }}
```

---

## 🧠 Notes

- Repos must have at least 5 stars to be considered.
- The Hacker News `user` cookie should be stable unless you log out or change your password.
- You can monitor your posts at: `https://news.ycombinator.com/submitted?id=YOUR_USERNAME`

---

## 📦 Local Testing
To run it manually:
```bash
export GITHUB_USERNAME=soodoku
export GITHUB_ORGS=appeler,recite
export HN_USER_COOKIE='your_cookie_here'
python scripts/post_repo_to_hn.py
```

---

## License
MIT © Gojiplus