Giter Site home page Giter Site logo

github-action-post-to-hacker-news's Introduction

github-action-post-to-hacker-news

GitHub Action for Posting Releases To Hacker News.

Required Environment Variables

  • HN_USERNAME: The username to use for Hacker News.
  • HN_PASSWORD: The password to use for Hacker News.
  • HN_TITLE_FORMAT_SPECIFIER: The Go format specifier to use for formatting the title on the Hacker News post. For example, setting HN_TITLE_FORMAT_SPECIFIER=Celery v%s Released would make the title posted Celery v5.1.0 Released (presuming the GITHUB_REF value once transformed/sanitized to just the tag part of the ref was 5.1.0 or (v5.1.0, see the Important Note(s) section below)).
  • HN_URL_FORMAT_SPECIFIER: The Go format specifier to use for formatting the url on the Hacker News post. Usage and behavior is identical to that of HN_TITLE_FORMAT_SPECIFIER above.
  • HN_TEST_MODE (Optional): If set to true (or True), instead of actually posting to Hacker News, simply print out the title and url that would otherwise be posted. This is useful in the beginning for checking that the title and url are exactly what you'd expect and that the action is behaving as you'd like. Without setting this, posts to Hacker News can get rate limited pretty easily, so it's nice to get the integration to be exactly what you want before you turn off test mode.

Important Note(s)

  • If the GITHUB_REF starts with refs/tags/, the refs/tags part will be stripped out, and the remaining part will be left trimmed of any "v" or "V" characters. This makes it easier to support releases of the format v5.1.0 (for example) and 5.1.0. So, refs/tags/v5.1.0 and refs/tags/5.1.0 will both end up being 5.1.0 for use in HN_TITLE_FORMAT_SPECIFIER and HN_URL_FORMAT_SPECIFIER .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.