add support for Bitbucket Pipelines badges (Shields.io)#1934
add support for Bitbucket Pipelines badges (Shields.io)#1934bors merged 3 commits intorust-lang:masterfrom
Conversation
delan
commented
Dec 4, 2019
- based on Support Cirrus CI badges #1782
- link in screenshot

|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @sgrif (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
| }, | ||
| BitbucketPipelines { | ||
| repository: String, | ||
| branch: String, |
There was a problem hiding this comment.
I’ve made the branch attribute required for now, because while Shields.io allows the branch to be omitted, it assumes the default branch is “master”, but Bitbucket lets you choose any branch as the default branch
There was a problem hiding this comment.
(strictly speaking, this is a bug that Shields.io could fix by querying the Bitbucket API for the repository’s main branch, but that’s a job for another day)
| @@ -0,0 +1,6 @@ | |||
| <a href="https://bitbucket.org/delan/nonymous/addon/pipelines/home#!/results/branch/{{ branch }}/page/1"> | |||
There was a problem hiding this comment.
the /page/1 is mandatory (e.g. this link doesn’t work)
There was a problem hiding this comment.
This URL looks like it has your username and project in it? It should use {{ repository }}, right?
| classNames: ['badge'], | ||
| repository: alias('badge.attributes.repository'), | ||
| branch: computed('badge.attributes.branch', function() { | ||
| return encodeURIComponent(this.get('badge.attributes.branch')); |
There was a problem hiding this comment.
the URL encoding is mandatory (e.g. this link doesn’t work)
| @@ -0,0 +1,6 @@ | |||
| <a href="https://bitbucket.org/delan/nonymous/addon/pipelines/home#!/results/branch/{{ branch }}/page/1"> | |||
There was a problem hiding this comment.
This URL looks like it has your username and project in it? It should use {{ repository }}, right?
carols10cents
left a comment
There was a problem hiding this comment.
Meant to "request changes", hit the wrong button, oops!
|
Looks great now!! Thank you so much!!! @bors r+ |
|
📌 Commit 79f15b4 has been approved by |
…s10cents add support for Bitbucket Pipelines badges (Shields.io) - based on #1782 - [link in screenshot](https://bitbucket.org/delan/nonymous/addon/pipelines/home#!/results/branch/branch%2Fname%2Fwith%2Fslashes/page/1) 
|
☀️ Test successful - checks-travis |
document support for Bitbucket Pipelines badges - merge after rust-lang/crates.io#1934