npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

github-to-discourse

v2.1.0

Published

Forwards commit data from a GitHub webhook to a Discourse thread

Downloads

6

Readme

GitHub to Discourse

npm

This is very simple.

It will forward any 'push' webhooks it receives to a specified thread on a Discourse forum. I couldn't find anything similar around, presumably because people don't really use Discourse to publish new commits. But hey, maybe there's a use-case somewhere.

Install

  1. npm install -g github-to-discourse
  2. cd `npm root -g`/github-to-discourse
  3. mv config.json.0 config.json and edit properties (see below)
  4. g2d

Note: You can also run g2d /path/to/config.json with a custom path, otherwise config.json will be used.

Config.json Format

Note: All properties are required unless listed otherwise

discourse

api_key

Your Discourse API Key. You should ask an admin for this. They'll need your username as well.

api_user

Your Discourse username.

domain

The domain of your Discourse server, without protocols or slashes. e.g. meta.discourse.org.

https_enabled

Does the Discourse server use HTTPS? This is optional, defaults to false

topic_id

The topic that the program should be posting replies to. You can get this from the number at the end of your topic URL: For https://meta.discourse.org/t/presence-features-for-forums/12 it's 12.

onebox_enabled

Some Discourse installations enable a 'onebox' for GitHub commit links, which displays them in a fancy format with the title and message. If you'd like to use this, and your server supports it, you can set this to true. Otherwise it's optional, and defaults to false.

repository

default_branch_only

Only processes commits to the default branch (configurable on GitHub). false by default.

webhook

path

The path name on your server that GitHub is sending Webhooks to. Include no slashes, e.g. push-to-here if you're hooking to http://myurl.com/push-to-here.

port

The port to run on. Optional, will default to 8080.

secret

Your secret for the GitHub webhook.