Skip to content

Post Random GitHub Repo to Hacker News

Actions
Picks a random public GitHub repository (from your user or orgs) and posts it to Hacker News.
v1
Latest
Star (1)

🚀 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 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

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:

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

Post Random GitHub Repo to Hacker News is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Picks a random public GitHub repository (from your user or orgs) and posts it to Hacker News.
v1
Latest

Post Random GitHub Repo to Hacker News is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.