Welcome to mirror list, hosted at ThFree Co, Russian Federation.

command.rb « mattermost « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9c37d0b0d7964d827a9900e99d88aa9c4c69f980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module Mattermost
  class Command < Session
    def self.create(team_id, trigger: 'gitlab', url:, icon_url:)

      post_command(command)['token']
    end

    private

    def post_command(command)
      post( "/teams/#{team_id}/commands/create", body: command.to_json).parsed_response
    end
  end
end