jsdelivr / bot

DEPRECATED The jerk of a bot that checks PRs and responds in comments
22 stars 14 forks source link

Structure check way to strict #72

Closed SupremeTechnopriest closed 5 years ago

SupremeTechnopriest commented 7 years ago

I've added a file to my project edgemesh.track.min.js. Updated update.json with the file. Waited for my PR to be accepted, then I went ahead and pushed the new file to npm.

I expected this to just work but instead I'm greeted with this:

It looks like you want to contribute to jsdelivr/jsdelivr, @jsdelivrbot, however there seems to be some issues with your pull request. See contributing for help amending your PR...

We try to keep the file structure as consistent as possible between versions; there were some changes in file structure from previous versions...
In edgemesh between 1.4.1 and 1.4.2 there was a change in file structure
+ edgemesh.track.min.js

the meta data above that has the correct file:

{
  "metadata": {
    "packageManager": "npm",
    "name": "edgemesh",
    "repo": "edgemesh/edgemesh",
    "files": {
      "basePath": "dist",
      "include": ["edgemesh.client.min.js", "edgemesh.hub.min.js", "edgemesh.worker.min.js", "edgemesh.sw.min.js", "edgemesh.track.min.js"],
      "exclude": []
    },
    "path": "/home/libgrabber/jsdelivr/files/edgemesh",
    "localVersions": ["1.4.0", "1.4.1"],
    "remoteVersions": ["0.0.0", "0.1.3", "1.0.0", "1.0.1", "1.0.2", "1.1.0", "1.1.1", "1.1.2", "1.1.3", "1.2.0", "1.2.1", "1.2.2", "1.2.3", "1.3.0", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.4.0", "1.4.1", "1.4.2"],
    "branchVersions": []
  },
  "metadataPath": "/home/libgrabber/jsdelivr/files/edgemesh/update.json",
  "versions": ["1.4.2"],
  "updateRemote": true,
  "version": "1.4.2",
  "updated": true,
  "updatePath": "/home/libgrabber/jsdelivr/files/edgemesh/1.4.2",
  "branch": "edgemesh/1.4.2"
}
  1. How am I supposed to add files to my project?
  2. How am I supposed to try the bot again without incrementing my version number?

I want to keep my versions clean. I do not want to have 50 patch versions entitled "trying to get jsdelivr to do what it's supposed to".

megawac commented 7 years ago

The purpose of this check is mostly so that moderators can sanity check that new files coming into the cdn make sense and that important files are not removed between versions. Unfortunately lately I've been the only one checking these pull requests and I'm swamped with other things in real life so it often takes a while for any pull requests flagged by the bot to get merged.

I'd be open to relaxing the checks for new files from a trusted user.

SupremeTechnopriest commented 7 years ago

Ah I see. Thanks for merging me in. Thats not a bad idea, but how do we determine who is a trusted user?

megawac commented 7 years ago

Trusted users are established in the config.yml of the server running the bot: https://github.com/jsdelivr/bot/blob/master/config.yml#L16

SupremeTechnopriest commented 7 years ago

Ah I see. That makes sense. I dont think ill personally be adding any more files to my project, but I'm sure someone out there would benefit from that change. Thanks for taking the time to explain.