URL-encode branch name for status images.
Camelcased all entries in the status image selection menu for consistency. Fixes travis-ci/travis-ci#2265
This commit is contained in:
parent
1a0344eeed
commit
ba2f00a09a
|
@ -12,11 +12,11 @@
|
||||||
when 'Image URL' then @statusImageUrl()
|
when 'Image URL' then @statusImageUrl()
|
||||||
when 'Markdown' then @markdownStatusImage()
|
when 'Markdown' then @markdownStatusImage()
|
||||||
when 'Textile' then @textileStatusImage()
|
when 'Textile' then @textileStatusImage()
|
||||||
when 'RDOC' then @rdocStatusImage()
|
when 'Rdoc' then @rdocStatusImage()
|
||||||
when 'AsciiDoc' then @asciidocStatusImage()
|
when 'AsciiDoc' then @asciidocStatusImage()
|
||||||
when 'Rst' then @rstStatusImage()
|
when 'Rst' then @rstStatusImage()
|
||||||
when 'POD' then @podStatusImage()
|
when 'Pod' then @podStatusImage()
|
||||||
when 'cc.xml' then @ccxmlStatusUrl()
|
when 'CCTray' then @ccxmlStatusUrl()
|
||||||
|
|
||||||
urlRepo: (->
|
urlRepo: (->
|
||||||
"https://#{location.host}/#{@slug}"
|
"https://#{location.host}/#{@slug}"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
"https://github.com/#{slug}/settings/hooks#travis_minibucket"
|
"https://github.com/#{slug}/settings/hooks#travis_minibucket"
|
||||||
|
|
||||||
statusImage: (slug, branch) ->
|
statusImage: (slug, branch) ->
|
||||||
"#{location.protocol}//#{location.host}/#{slug}.svg" + if branch then "?branch=#{branch}" else ''
|
"#{location.protocol}//#{location.host}/#{slug}.svg" + if branch then "?branch=#{encodeURIComponent(branch)}" else ''
|
||||||
|
|
||||||
ccXml: (slug) ->
|
ccXml: (slug) ->
|
||||||
"#{Travis.config.api_endpoint}/repos/#{slug}/cc.xml"
|
"#{Travis.config.api_endpoint}/repos/#{slug}/cc.xml"
|
||||||
|
|
|
@ -13,11 +13,11 @@ Travis.StatusImagesView = Em.View.extend
|
||||||
'Image URL',
|
'Image URL',
|
||||||
'Markdown',
|
'Markdown',
|
||||||
'Textile',
|
'Textile',
|
||||||
'RDOC',
|
'Rdoc',
|
||||||
'AsciiDoc',
|
'AsciiDoc',
|
||||||
'Rst',
|
'Rst',
|
||||||
'POD',
|
'Pod',
|
||||||
'cc.xml'
|
'CCTray'
|
||||||
]
|
]
|
||||||
|
|
||||||
didInsertElement: ->
|
didInsertElement: ->
|
||||||
|
|
Loading…
Reference in New Issue
Block a user