Method: Gitlab::Client::ProjectBadges#edit_project_badge

Defined in:
lib/gitlab/client/project_badges.rb

#edit_project_badge(project, badge_id, options = {}) ⇒ Gitlab::ObjectifiedHash

Updates a badge of a project..

Examples:

Gitlab.edit_project_badge(5, 1, { link_url: 'https://abc.com/gitlab/gitlab-ce/commits/master', image_url: 'https://shields.io/my/badge1' })

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • badge_id (Integer)

    The badge ID.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :link_url(optional) (String)

    URL of the badge link

  • :image_url(optional) (String)

    URL of the badge image

Returns:


55
56
57
# File 'lib/gitlab/client/project_badges.rb', line 55

def edit_project_badge(project, badge_id, options = {})
  put("/projects/#{url_encode project}/badges/#{badge_id}", body: options)
end