This GitHub Action picks a random public repo from your GitHub profile (or orgs) and submits it to Hacker News via a headless browser using your session cookie.
Perfect for passive social proof, open-source visibility, or quietly testing demand.
- 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
Add the following GitHub Action secrets:
Name | Description |
---|---|
HN_USER_COOKIE |
Your user session cookie from Hacker News |
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 }}
- 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
To run it manually:
export GITHUB_USERNAME=soodoku
export GITHUB_ORGS=appeler,recite
export HN_USER_COOKIE='your_cookie_here'
python scripts/post_repo_to_hn.py
MIT © Gojiplus