From e50eb7003ed9543866bf907f52f8f0a4faa1e591 Mon Sep 17 00:00:00 2001 From: turt2live Date: Sun, 28 May 2017 11:13:36 -0600 Subject: [PATCH] Add documentation around travis-ci --- docs/scalar_server_api.md | 43 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/docs/scalar_server_api.md b/docs/scalar_server_api.md index 7edb7d1..3318e84 100644 --- a/docs/scalar_server_api.md +++ b/docs/scalar_server_api.md @@ -50,7 +50,31 @@ None of these are officially documented, and are subject to change. } } }, - "self":false + "self": false + }] +} +``` + +**Travis-CI Bot Response**: +``` +{ + "bot_user_id": "@_neb_travisci_=40travis=3at2l.io:matrix.org", + "integrations": [{ + "type": "travis-ci", + "user_id": "@travis:t2l.io", + "config": { + "webhook_url": "https://scalar.vector.im/api/neb/services/hooks/some_long_string", + "rooms": { + "!JmvocvDuPTYUfuvKgs:t2l.io": { + "repos": { + "turt2live/matrix-dimension": { + "template": "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}\n Change view : %{compare_url}\n Build details : %{build_url}\n" + } + } + } + } + }, + "self": true }] } ``` @@ -76,4 +100,21 @@ None of these are officially documented, and are subject to change. "https://ci.t2l.io/view/all/rssAll": {} } } +``` + +## POST `/api/integrations/travis-ci/configureService?scalar_token=...` + +**Body**: +``` +{ + "rooms": { + "!JmvocvDuPTYUfuvKgs:t2l.io": { + "repos": { + "turt2live/matrix-dimension": { + "template": "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}\n Change view : %{compare_url}\n Build details : %{build_url}\n" + } + } + } + } +} ``` \ No newline at end of file