flying-dice / dcs-dropzone-mod-manager

DCS World Mod Manager (WIP) DO NOT USE YET
3 stars 0 forks source link

RFC: Enhancing DCS Dropzone Mod Manager with a Manual & Automated Registry Update System #1

Open JonathanTurnock opened 9 months ago

JonathanTurnock commented 9 months ago

1. Introduction

Background

DCS Dropzone is a community mod manager for DCS World, designed to streamline the process of managing and updating mods. The mod manager currently operates by fetching mod lists from a registry - a collection of JSON files hosted on Cloudflare Pages. These JSON files point to various GitHub repositories containing the mods. The desktop application of DCS Dropzone interacts directly with the GitHub Releases API to obtain the latest release information.

Purpose

The purpose of this RFC is to propose a system enhancement for DCS Dropzone. The enhancement aims to automate the update process of the registry and provide a more flexible and inclusive mechanism for mod authors, especially those not using GitHub.

2. Proposal

Overview

The primary change involves shifting the responsibility of updating mod information from the user's desktop application to the registry itself. This change will enable the registry to hold all necessary data for the app to function, reducing direct dependency on GitHub's API.

For GitHub Users

For Non-GitHub Users

3. Advantages

JonathanTurnock commented 9 months ago

c4.drawio.svg

john681611 commented 9 months ago

Ah I was under the impression we could subscribe to repos ourselves. But still looks good.

Alternative: What about hooking into a GitHub user notifications https://docs.github.com/en/rest/activity/notifications?apiVersion=2022-11-28#list-notifications-for-the-authenticated-user I can't find docs but I wonder if it's possible to watch only the repository releases. Then we just poll the notifications every hour or so and pickup releases.

JonathanTurnock commented 9 months ago

I think its not to much to ask for people to use a webhook right, then if there are other pathways it should be pretty easy.

I've created a branch with the changes to get a feel for them and also added a README that instructs how this would work.

https://github.com/flying-dice/dcs-mod-manager-registry/tree/develop

The TLDR is that they send a GH Release event, which I think contains the repo info.

We give them a signed JWT which contains the folder and that way no funny business should occur with people writing to folders they have no business in.