-
Notifications
You must be signed in to change notification settings - Fork 599
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #1551 - robertohuertasm:azure-devops-badge, r=carols10c…
…ents Add support for Azure DevOps badge I added a project of mine that is already using `Azure Devops` into `fixtures/crates.js`. Let me know if that's an inconvenience and I'll remove it. I just put it there to easily see that everything was working as expected. I also added some tests by following the existing code example. See also rust-lang/cargo#6264
- Loading branch information
Showing
5 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Component from '@ember/component'; | ||
import { computed } from '@ember/object'; | ||
import { alias } from '@ember/object/computed'; | ||
|
||
export default Component.extend({ | ||
tagName: 'span', | ||
classNames: ['badge'], | ||
project: alias('badge.attributes.project'), | ||
pipeline: alias('badge.attributes.pipeline'), | ||
build: computed('badge.attributes.build', function() { | ||
return this.get('badge.attributes.build') || '1'; | ||
}), | ||
text: computed('pipeline', function() { | ||
return `Azure Devops build status for the ${this.pipeline} pipeline`; | ||
}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<a href="https://dev.azure.com/{{ project }}/_build/latest?definitionId={{ build }}"> | ||
<img src="https://dev.azure.com/{{ project }}/_apis/build/status/{{ pipeline }}" alt="{{ text }}" title="{{ text }}"> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters