github-stars

command module
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

github-stars

release codecov build go report card license

Receives Star events from GitHub and posts them to Slack.

Configuring a GitHub App

github-stars is implemented as a GitHub App: rather than the server polling for new stars, a GitHub App will forward the events to a webhook when they occur.

To configure a GitHub app:

  • Go to your GitHub account or organization settings.
  • Navigate to Settings > Developer settings > GitHub Apps.
  • Click New GitHub App.
  • Fill in the details:
    • GitHub App Name: Choose a name for your app.
    • Homepage URL: Enter a valid URL (e.g., your app’s website or GitHub profile).
    • Webhook URL: Add the endpoint where your app will receive event notifications.
    • Webhook secret: Add a secure secret string
  • In the Repository Permissions section, grant the following permission:
    • Metadata: Read-only (required to identify repositories).
  • In the Subscribe to Events section, check the Star event.
  • Save your app.
  • Install the app to your account. You can give access to all repositories, or a subset.

Configuring github-stars

github-stars supports the following commandline options:

  -archived
        include archived repositories
  -directory string
        database directory (default ".")
  -github.token string
        GitHub API token
  -github.webhook.addr string
        address to listen on for GitHub webhook calls (default ":8080")
  -github.webhook.secret string
        secret to verify GitHub webhook calls
  -log.format string
        log format (default "text")
  -log.level string
        log level (default "info")
  -prom.addr string
        prometheus listen address (default ":9100")
  -prom.path string
        prometheus path (default "/metrics")
  -slack.webhook string
        Slack webhook URL to post messages to
  -user string
        user to scan for repositories

At a minimum, you will need to configure:

  • github.token: a GitHub personal access token granting access to your repositories.
  • github.webhook.secret: the Webhook secret configured in the GitHub app.
  • user: your GitHub account name.
  • slack.webhook: the Slack webHook to use to post to your Slack workspace / channel.

Authors

  • Christophe Lambin

License

This project is licensed under the MIT license.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
Package slogctx manages a slog.Logger in a context.Context.
Package slogctx manages a slog.Logger in a context.Context.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL