github-stars

command module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: MIT Imports: 7 Imported by: 0

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:


  -addr string
        Prometheus handler address (default ":9091")
  -debug
        Enable debug mode
  -directory string
        Database directory (default ".")
  -github.token string
        GitHub API token
  -github.webhook.addr string
        Address for the webhook server (default ":8080")
  -github.webhook.secret string
        Secret for the webhook server (default "todo")
  -include_archived
        Include archived repositories
  -slack.webHook string
        Slack WebHook URL
  -user string
        GitHub username

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 - see the LICENSE.md file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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