Граф коммитов

192 Коммитов

Автор SHA1 Сообщение Дата
Dirkjan Bussink ba351da29c Reduce the dependencies of the chatops controller
When looking at options to mitigate
https://github.com/github/github/issues/174690, my initial approach
there failed because we can't drop some Rails components because we use
gems that express all of Rails as a dependency instead of the parts they
need.

The chatops controller is one of those. It looks like though it only
needs ActiveSupport & ActionPack so I reduced the dependencies here to
just those parts.
2021-03-25 11:37:01 -04:00
Lee Quarella 9cb11b7d81 Update cache control conditional for Rails >= 5 2021-03-10 13:35:04 -05:00
Lee Quarella 3fdf53717d Fix `start_with` deprecation 2021-03-10 13:34:03 -05:00
Nina Kaufman 278033696b Update rails dependency in gemspec 2021-02-25 15:25:34 -08:00
Lee Quarella c7ab6e21cd Update syntax to match Rails `content_mime_type` 2021-01-29 12:08:19 -05:00
Lee Quarella 4a60b3d1e0 Bump to rails 6 and ruby 2.7 2021-01-28 10:54:20 -05:00
Raffaele Di Fazio ac72188c38
Merge pull request #51 from github/raffo/fix-ci
Fix build steps
2020-01-20 19:39:36 +01:00
Raffaele Di Fazio e9e51b1f19 changes build steps
Signed-off-by: Raffaele Di Fazio <raffo@github.com>
2020-01-20 19:37:32 +01:00
Raffaele Di Fazio db5fb3c173
Adds CI with Actions 2020-01-20 19:33:34 +01:00
Misty De Meo d40bd141f0
Merge pull request #50 from github/add_ruby_version
Commit a ruby-version
2020-01-20 14:28:45 -04:00
Misty De Meo 7b63dc0acc Commit a ruby-version
This is in use just for local development.
2020-01-20 10:17:54 -08:00
Kristján Oddsson 9c56ffb81b
missing comma 2019-11-04 11:55:57 +00:00
Misty De Meo 581957d6ba Revert "add instructions to run against local hubot"
This reverts commit ceb3389620.
2019-02-14 13:01:50 -08:00
Misty De Meo 7b2de6771e
Merge pull request #48 from github/docs_to_include_dev_testing
add instructions to run against local hubot
2019-02-14 13:01:18 -08:00
Georgi Knox ceb3389620 add instructions to run against local hubot 2019-02-14 15:21:33 -05:00
Misty De Meo d25909bfbc v4.1.0 2018-11-13 13:36:18 -08:00
Misty De Meo 083cd61693
Merge pull request #45 from github/add-message-id
Proposal to add an optional message id to the CRPC protocol
2018-11-13 13:35:37 -08:00
Misty De Meo 61336a5afc
Merge pull request #47 from github/new_release
Bump version to 4.0.1
2018-11-08 09:48:21 -08:00
Misty De Meo 23007c321b Bump version to 4.0.1 2018-11-08 09:47:14 -08:00
Misty De Meo 63613bd60b
Merge pull request #46 from github/jaredonline/send-valid-json-errors
Send valid JSON errors
2018-11-08 09:44:39 -08:00
Jared McFarland b7413c53be Send valid JSON errors
In a number of places the controller was sending plaintext responses
back when it encountered an error in a before_action. Those responses
were being "parsed" by Hubot, assuming they were JSON. That parsing
would fail, and return a generic error back to the user.

This sends back valid JSON using the already written jsonrpc_error
method. I followed the pattern I saw, and invented a new set of error
numbers starting at -32800 (there was already -32700 and -32600).
2018-11-08 09:23:40 -08:00
Brian Anglin 7c34327e2c Fixes test helpers to include message_id 2018-10-18 08:24:51 -07:00
Brian Anglin 0900e06809 Adds failing test for message_id in test_helpers 2018-10-18 08:24:35 -07:00
Brian Anglin 29a0b6def8 Updates README.md with message_id 2018-10-17 10:41:40 -07:00
Brian Anglin 8f718f5bc3 Adds message_id to params whitelist 2018-10-17 10:36:02 -07:00
Brian Anglin 279b8d9c00 Adds test to confirm message_id getting passed 2018-10-17 10:34:07 -07:00
Brian Anglin 7596e07d65
Update protocol-description.md 2018-10-15 12:32:30 -04:00
Misty De Meo a707fc0491
Merge pull request #44 from github/remove_gems
Remove rspec_json_dumper
2018-10-10 09:41:09 -07:00
Misty De Meo 35f94caa9f Remove rspec_json_dumper
We're not actually running the CI environment for this
gem that would use this gem.
2018-10-10 09:35:11 -07:00
Misty De Meo 698646cf8d Bump version to 4.0.0 2018-09-21 15:35:56 -07:00
Tim Pease d866ec0d04
Merge pull request #41 from github/twp/accept-json-encoded-request-body
Refactor params handling
2018-09-21 10:50:59 -06:00
Tim Pease 2a857d05ee version bump for release 2018-09-21 10:24:40 -06:00
Tim Pease 8adf8e612d whitespace cleanup 2018-09-21 09:52:55 -06:00
Tim Pease 2d7cddd7d9 Permissive JSON PRC params
Reworking how the JSON RPC params are being handled. They are not more
permissive, but the request params are still strongly enforced.
2018-09-20 17:38:20 -06:00
Tim Pease 450b7c5f94 minor cleanup 2018-09-20 08:35:11 -06:00
Tim Pease 74ce502d09 explicitly parse JSON request bodies 2018-09-19 14:27:51 -06:00
Tim Pease 006482677b Explicitly check for permitted parameters
This increases the security of chatops endpoins by only allowing
permitted parameters to be passed. It goes further and validates the
JSON RPC params are also explicitly named in the regular expression
matchers as well.
2018-09-19 14:25:37 -06:00
Tim Pease 0478db9cff fixing shadowed variable 2018-09-19 14:25:01 -06:00
Tim Pease 7f76bf3e81 Force usage of `jsonrpc_params`
The whole `scrubbed_params` has seems a little fishy to me - it is
copying the JSON RPC params up into the main params hash. But it cannot
copy all of them because you could then invoke somebody else's chatop
command by providing a `chatop` argument to your own command.

It is better to separate concerns and just leave the JSON RPC params
where they are.
2018-09-19 13:11:08 -06:00
Tim Pease d483bc3682 Emulate the reference hubot-chatops-rpc implementation
The reference hubot chatops-rpc implementation has the generic arguments
(--param value) overwriting the parameter values extracted via the
regular expression parsing. The change to the test here emulates that
behavior.

refs d32d185f63/src/chatops-rpc.coffee (L250-L253)
2018-09-19 12:54:45 -06:00
Tim Pease ed4c691ba9 fixing ruby warning 2018-09-19 12:47:54 -06:00
Misty De Meo d52753a093 v3.1.1 2018-09-14 14:00:54 -07:00
John Hawthorn 8a53f98742
Merge pull request #39 from github/remove_recursive_symlink
Remove recursive symlink spec/dummy/spec -> spec/
2018-09-04 16:08:58 -07:00
John Hawthorn 62ce6a180d Remove recursive symlink spec/dummy/spec -> spec/ 2018-08-31 17:09:55 -07:00
Misty De Meo e8c2828948 Add Misty to authors 2018-06-26 12:15:31 -07:00
Misty De Meo b06a83627b Prepare 3.1.0 2018-06-26 12:09:58 -07:00
Misty De Meo 1002a1a7fd
Merge pull request #37 from github/add_attachment_support
Add support for "attachment" feature
2018-06-26 12:09:01 -07:00
Misty De Meo baac38a3e9 Document what options hash is 2018-06-25 16:03:23 -07:00
Misty De Meo 265ee9d8d9 Add support for "attachment" feature
This adds support for a new option, which allows servers to hint
to clients that they should format the response as a separate
attachment instead of returning it inline as a message.
Because this is a hint, and because not all clients will support
an attachment mode, clients are allowed to ignore this field for
any reason.

For example, Slack supports "snippets", which are arbitrary text
documents sent as attachments. These don't use Slack's normal message
formatting and have a larger filesize limit.
2018-06-25 11:27:48 -07:00
Misty De Meo 5378b87c8a
Merge pull request #36 from github/update_rails42
Bump Rails from 4.2.6 to 4.2.10
2018-03-20 16:57:43 -07:00