github / hubot-scripts

DEPRECATED, see https://github.com/github/hubot-scripts/issues/1113 for details - optional scripts for hubot, opt in via hubot-scripts.json
MIT License
3.53k stars 1.86k forks source link

Add information about scripts with package replacements #1696

Closed technicalpickles closed 8 years ago

technicalpickles commented 8 years ago

This is code to go along with https://github.com/github/hubot-scripts/issues/1641 . I've added a replacements.json in the root with a map of scripts to homepages of extracted scripts. Then there's a helper in src/hubot-scripts.coffee to actually deprecate a script.

There are a number of deprecated scripts already, so I've updated one of them to use this helper, but if it looks good, will apply to others.

Another approach I was considering was moving some or all of this into hubot's core. One thought was that can do it right before requiring, rather than as it's being required, so scripts wouldn't need to be modified.

cc @github/open-source-hubot-maintainers

technicalpickles commented 8 years ago

Was talking to @bkeepers about this earlier, and he was starting work on a script to search GitHub for possible replacements. That got me to thinking that we could just prompt users to search Google, GitHub, and NPM for packages if there isn't a replacement, and to post back on https://github.com/github/hubot-scripts/issues/1641.

If we are doing that, then it's probably not worth updating every script to have the deprecate logic. Given that, this is probably easier to have in github/hubot. The downside is the data about replacements is in that repo, and requires hubot releases to update. That might not be so bad though.

technicalpickles commented 8 years ago

A few months ago in https://github.com/github/hubot/pull/970 I added support for checking repalcements.json that I started before this branch. I expanded on that to check for the replacements.json, and if it's not present, prompt to install a newer version of hubot-scripts that includes it. If it is present, and there's scripts that don't have replacements, there's a recommendation to update for a more recent version that maybe has more replacements.

That makes this PR just the replacements.json, and to remove manual deprecation some scripts had. There is whitespace relatated diffs too, but those can be ignored.