Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
SpaceDock notifies CKAN of mod creation and updates if the uploader checks the CKAN checkbox. Currently a lot of this logic is owned by SpaceDock:
$kref
s and then a request is sent to the NetKAN/inflate
web hook to process themThis is more CKAN implementation detail than SpaceDock ought to have to be aware of. SpaceDock should really only have to tell CKAN, hey, we have this event for this mod, and CKAN should figure out the rest.
Changes
NOTE: This change depends on KSP-CKAN/NetKAN-Infra#130! The format of the
/sd/add
hook was wrong in the initial implementation, and this PR assumes that that other PR has been merged.The CKAN team has been rewriting our web hooks, and as part of that we've created two new ones to replace this logic:
/sd/add
- Receives info about a mod and makes a pull request in NetKAN, just like before but now owned by CKAN/sd/inflate
- Receives info about a mod and submits it to the inflation queue, again just as before but owned by CKANThis pull request updates SpaceDock to use these new web hooks, simplifying the SpaceDock side of things significantly. The https://github.com/KSP-SpaceDock/SpaceDock-Notify repo can now be retired.
Make the following changes to
config.ini
after merge:Fixes #232.