Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bye bye robot.http, hello fetch #182

Merged
merged 9 commits into from
May 1, 2024
Merged

Conversation

KeesCBakker
Copy link
Collaborator

@KeesCBakker KeesCBakker commented Apr 30, 2024

We've been talking for a while now to move away from the robot.http implemention of the HTTP client. I did some more refactoring and we finally don't have to use it anymore. This means our bot is a bit cleaner.

Main points:

  • deleted http.js -- which could be considered a breaking change from the previous package
  • rewrite of RocketChatUploader.js -- but I fear it has no tests, so I have no way of knowing if we're OK
    image
  • small rewrite for GrafanaClient -- we dropped createHttpClient and so better validation of the Grafana response.
  • added sendDashboardChartFromString for convenience to the Bot (should be another PR, but makes testing easier for me).
  • added support for mocha testing to the dev container with the hbenl.vscode-mocha-test-adapter test adapter. Now we don't have to do a .only all the time, but just run the test from the IDE:
    image

@KeesCBakker
Copy link
Collaborator Author

Will test this tomorrow with a real Hubot. But I only use the combination of Slack & S3. @stephenyeargin to you have some sort of a RocketChat instance?

@stephenyeargin
Copy link
Owner

I do not, that was introduced by @mfilotto back in #70. I would be fine with a good faith effort, and we can address bugs if they come in.

@KeesCBakker
Copy link
Collaborator Author

Refactored the mocha tests, swapped out mocha.opts in favor of .mocharc.json. All tests now use the same config.

Check how it looks in a Visual Studio Code dev container with the Mocha Test adapter:

image

This will make it easier to run certain tests directly from your IDE.

@KeesCBakker KeesCBakker merged commit 30dd8c0 into main May 1, 2024
4 checks passed
@KeesCBakker KeesCBakker deleted the feature/fetch-all-tha-thingz branch May 1, 2024 07:09
@KeesCBakker KeesCBakker restored the feature/fetch-all-tha-thingz branch May 1, 2024 07:10
@KeesCBakker KeesCBakker deleted the feature/fetch-all-tha-thingz branch May 1, 2024 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants