Nexus-Mods / NexusMods.App

Home of the development of the Nexus Mods App
https://nexus-mods.github.io/NexusMods.App/
GNU General Public License v3.0
1.07k stars 50 forks source link

GitHub bot for change tracking of games and important mods #269

Open erri120 opened 1 year ago

erri120 commented 1 year ago

To better deal with game support issues arising from mods or games that got updated, it might be worth looking into adding a custom GitHub bot that runs periodically and checks for changes. If it finds any changes, it opens an issue with correct tags and assignees.

The bot would read from a config file (YAML) which contains a list of things to check for:

config:
  cron: "0 10 * * MON-THU"
  games:
    labels: [ "game support", "automated" ]
  mods:
    labels: [ "automated" ]

games:
  - name: "Skyrim Special Edition"
  - name: "Stardew Valley"
    assignees: [ erri120 ]

mods:
  - name: "SMAPI"
    game: "Stardew Valley"
    github: "Pathoschild/SMAPI"
  - name: "redscript"
    game: "Cyberpunk 2077"
    nexus: 1511
    assignees: [ halgari ]
erri120 commented 1 year ago

Octokit can be used to access the GitHub API and to create issues and get releases.

Checking for Steam updates is trickier. The SteamKit can be used to interact with all Steam APIs. SteamWebPipes is an example project that shows how to use SteamKit to listen for updates to the changelists. PICSGetChangesSince could be used when looking for updates on-demand, instead of continuously. However, these changelists are very bare bones, don't come with useful metadata or information that can be displayed to humans. Changes to depos happen very frequently and don't often mean "new release".

SteamDB provides patchnotes for games and an RSS feed to subscribe to. SteamDB doesn't allow scraping, however, RSS feeds are machine-readable feeds and designed to be fetched periodically. It might be best to contact them and clarify this before going further.

Steam itself provides an RSS feed for updates, however these don't always correlate to game updates, something that SteamDB can track.

Alternatively, manual parsing of official news can be used instead. PatchBot doesn't work for all games, but can extract patch notes and updates from official news sources, like the game studio's blog.

erri120 commented 1 year ago

Worked on in https://github.com/Nexus-Mods/NexusMods.ChangeBot

BellCubeDev commented 1 year ago

This issue is a bit old but I wonder if GitHub Actions may be useful here. Run just about anything given many different trigger types (including on a schedule) and store things like tokens as Secrets. You also get a specialized GitHub API key with exactly the permissions you specify.