Skip to content

GitHub Watcher

David edited this page Dec 10, 2017 · 2 revisions

Author: Davnit / Pyro

Description: Monitors GitHub repositories for new commits and announces them.

Commands:

  • /gitwatch <action> [repository]
    • Generic command to interface with the script.
    • <action> can be one of the following:
      • add <owner>/<repo>/[branch]
        • Adds the specified repository to the watch list.
        • If [repo] is omitted, the default used is "master"
        • Examples:
          • /gitwatch add Davnit/StealthBotScripts
          • /gitwatch add stealthbot/StealthBot/unitext
      • remove <owner>/<repo>/<branch>
        • Removes the specified repository from the watch list.
        • [repo] is required.
        • Example:
          • /gitwatch remove Davnit/StealthBotScripts/master

Settings:

  • There are several configurable settings. To change them, disable the script and then edit Scripts.ini under the [GitHub Watcher] section.
    • WatchFile (string): the name of the file used to store a list of watched repositories and associated data (default: git_watch.txt)
    • CheckInterval (int): the time to wait, in seconds, between checking each repository in the list (default: 60)
    • CheckDelay (int): the time to wait, in seconds, between each round of checks (default: 600)
    • MaxCommits (int): the maximum number of commits to print individually. If there are more commits, they will be combined into one generic message. (default: 1)
    • DisplayMode (int): the DSP mode used to display notifications (default: 1)
      • 1 = in channel
      • 2 = emote
      • 4 = local only (in the bot window)

Notes:

  • This script uses the GitHub API and is subject to applicable rate limits.
Clone this wiki locally