Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Azure DevOps badge #1551

Merged
merged 4 commits into from
Feb 12, 2019
Merged

Add support for Azure DevOps badge #1551

merged 4 commits into from
Feb 12, 2019

Conversation

robertohuertasm
Copy link
Contributor

@robertohuertasm robertohuertasm commented Nov 5, 2018

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

@robertohuertasm robertohuertasm changed the title add support for azure devops badge Add support for Azure DevOps badge Nov 5, 2018
@robertohuertasm
Copy link
Contributor Author

Hi, are there any updates here? Is there something I need to change to make it ready to be merged? Thanks!

@robertohuertasm
Copy link
Contributor Author

Is there anyone in particular that I must ping so I can get some feedback about whether this PR is going to be eventually merged or not?

@carols10cents
Copy link
Member

Hi, thank you for your patience. The team that maintains crates.io is all volunteer, and you'll notice that your pull request is not the only one we have to review. We will get to this as soon as we can.

@robertohuertasm
Copy link
Contributor Author

Hi @carols10cents, thanks for your feedback and apologies if I my messages felt a little bit rude but that wasn't at all my intention.

I'm well aware of the effort that maintaining a project in a volunteer way requires and, of course, I already noticed that there are lots of PRs pending. The thing is that most of the other PRs have had some feedback or have been already merged, even when they were submitted after this one, and I wasn't sure if that was because you were not sure about supporting new badges, in which case, I was willing to close this PR and don't pay attention to it anymore.

Again, thank you very much for your message!

@carols10cents
Copy link
Member

Hi, thank you again for your patience. I just took a look at the sample added to the mirage fixtures, which was very helpful so that I don't have to figure out how to set up Azure DevOps, thank you!

However, when I run npm run start (which runs the frontend using the fixtures) then visit http://localhost:4200/crates?page=2 (which shows the rust_mixin crate that has all the badges), the badge says "Azure pipelines: set up now". The HTML for the badge is:

<a href="https://dev.azure.com/robertohuertasm/github-oss/_build/latest?definitionId=2">
    <img src="https://dev.azure.com/robertohuertasm/github-oss/_apis/build/status/microserver" alt="Azure Devops build status for the microserver pipeline" title="Azure Devops build status for the microserver pipeline">
</a>

When I go to https://dev.azure.com/robertohuertasm/github-oss/_build?definitionId=2, click on the "..." to the right of the "edit" and "queue" buttons, then in the menu choose "status badge", the markdown recommended for this project is:

[![Build Status](https://dev.azure.com/robertohuertasm/github-oss/_apis/build/status/robertohuertasm.microserver?branchName=master)](https://dev.azure.com/robertohuertasm/github-oss/_build/latest?definitionId=2&branchName=master)

The diff from this PR to what Azure recommends being:

-https://dev.azure.com/robertohuertasm/github-oss/_apis/build/status/microserver
+https://dev.azure.com/robertohuertasm/github-oss/_apis/build/status/robertohuertasm.microserver?branchName=master

The branch name doesn't appear to make a difference, but the second instance of robertohuertasm does seem to be important.

When I visit your Azure DevOps page at https://dev.azure.com/robertohuertasm/github-oss/_build, I see that you have the pipelines "robertohuertasm.microserver", "robertohuertasm.mdlint", and "azure-rust": that is, some of them start with "robertohuertasm" and some of them don't.

I don't know much about Azure Dev Ops, so I'm not sure if my guess is correct, but it looks like the fixture data should perhaps have pipeline set to "robertohuertasm.microserver" instead of "microserver"? When I make that change and reload http://localhost:4200/crates?page=2, the badge says "Azure pipelines: succeeded" instead of "set up" which seems better. Is that right? Or is there something about the parameters or image URL construction that isn't quite right?

@robertohuertasm
Copy link
Contributor Author

Hi @carols10cents, it seems that depending on how you setup the Azure pipeline the default name may include your username (at least if you're using a Github repo).

Basically, you can setup your Azure pipeline by introducing a yaml file in your repo (then you get this username.reponame naming) or by using a visual designer in the Azure Devops website.

Anyway, the name can be changed at any time. I may have messed it up when I prepared this PR as it seems that I was using the proper url in my repo's badge.

To make it easier I've changed the name of the pipeline so we don't have to submit any change here and now it works. I've just tested it again.

Thanks @carols10cents for taking the time to review this! 😊

@carols10cents
Copy link
Member

Thank you for bearing with me! The badge looks great now. I'll comment on the cargo PR when this change has been deployed!

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 12, 2019

📌 Commit 435f150 has been approved by carols10cents

@bors
Copy link
Contributor

bors commented Feb 12, 2019

⌛ Testing commit 435f150 with merge 9cb1f3f...

bors added a commit that referenced this pull request Feb 12, 2019
…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
@bors
Copy link
Contributor

bors commented Feb 12, 2019

💔 Test failed - checks-travis

@robertohuertasm
Copy link
Contributor Author

@carols10cents it seems that there were some errors after the automatic merging. I've fixed them and pushed again. It seems to be all ready for

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 12, 2019

@robertohuertasm: 🔑 Insufficient privileges: Not in reviewers

@carols10cents
Copy link
Member

Thank you for fixing!

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 12, 2019

📌 Commit 5eba143 has been approved by carols10cents

@bors
Copy link
Contributor

bors commented Feb 12, 2019

⌛ Testing commit 5eba143 with merge 6fff863...

bors added a commit that referenced this pull request Feb 12, 2019
…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
@bors
Copy link
Contributor

bors commented Feb 12, 2019

☀️ Test successful - checks-travis
Approved by: carols10cents
Pushing 6fff863 to master...

@bors bors merged commit 5eba143 into rust-lang:master Feb 12, 2019
@robertohuertasm robertohuertasm deleted the azure-devops-badge branch February 12, 2019 23:59
bors added a commit to rust-lang/cargo that referenced this pull request Feb 14, 2019
Add support for Azure DevOps

Related to rust-lang/crates.io#1551 which is still pending to be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants