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

Support CircleCI badges #807

Merged
merged 2 commits into from
Jul 11, 2017
Merged

Conversation

sfackler
Copy link
Member

Closes #800

ember-cli seems unhappy with Node 8 that Arch Linux has, so I haven't run frontend tests unfortunately :(

Badge docs: https://circleci.com/docs/1.0/status-badges/

@sfackler
Copy link
Member Author

sfackler commented Jul 4, 2017

Ping @carols10cents

@locks
Copy link
Contributor

locks commented Jul 4, 2017

cc @Turbo87 on node 8 + CLI

@Turbo87
Copy link
Member

Turbo87 commented Jul 4, 2017

@sfackler
Copy link
Member Author

sfackler commented Jul 4, 2017

Rebased

@sfackler
Copy link
Member Author

sfackler commented Jul 5, 2017

The test failure looks unrelated to this PR.

@carols10cents
Copy link
Member

Thank you for your patience on this! Rebased and force pushed to resolve a merge conflict and get tests to run again.

The code looks good, but I noticed that the CircleCi docs say this:

(You can also link to the image without providing a circle-token, in which case the image will only appear for people who are currently logged-in to circleci.com!)

That seems unfortunate. Do you think we should optionally accept a circle-token, so at least crate authors have the ability to make their image show up for everyone?

@carols10cents
Copy link
Member

Oooooh, one other thing:

One small wrinkle: if your branch name includes characters that are “special” in URLs (most commonly ‘/’) they’ll need to be URL encoded when constructing status badge URLs. For example, the badge for a branch called ‘feature/nonexistent’ would be at ‘…/tree/feature%2Fnonexistent.png’.

I just tested this out by making a branch named "cratesio/test" and specifying that:

[badges]
circle-ci = { repository = "carols10cents/sassers", branch = "cratesio/test" }

and indeed, we're not URL encoding the slash; the HTML getting generated for the image is:

<img src="https://circleci.com/gh/carols10cents/sassers/tree/cratesio/test.svg?style=shield" alt="Circle CI build status for the cratesio/test branch" title="Circle CI build status for the cratesio/test branch">

and indeed the image doesn't load :-/

@sfackler
Copy link
Member Author

sfackler commented Jul 9, 2017

I think the circle token comment only applies to private repos - I was worried about this as well initially. For example, this badge page is visible to me when logged out from circle - is it visible for you as well?

Fixed up the URL encoding!

@Turbo87
Copy link
Member

Turbo87 commented Jul 9, 2017

@carols10cents I'm wondering why we don't just use http://shields.io/ instead for all the badges?

@carols10cents
Copy link
Member

@carols10cents I'm wondering why we don't just use http://shields.io instead for all the badges?

@Turbo87 does it support everything we want? i don't see gitlab CI on there, for example

@Turbo87
Copy link
Member

Turbo87 commented Jul 9, 2017

yeah, seems like GitLab is missing 😞

@sfackler
Copy link
Member Author

sfackler commented Jul 9, 2017

I've also noticed shields's Cargo version badge being really slow to load.

@carols10cents
Copy link
Member

Thanks! Sorry for taking so long on this, but I'll be deploying it once travis passes! 🍏

@sfackler sfackler deleted the circle-badge branch July 11, 2017 22:11
@sfackler
Copy link
Member Author

Sweet, thanks! There's no list of badges in Cargo I need to update as well, is there?

@carols10cents
Copy link
Member

Yeah there is: https://github.com/rust-lang/cargo/blame/1ee4edba1fa1a1d323be97bfec280764407d89e5/src/doc/manifest.md#L157

I got distracted yesterday and didn't finish deploying, but the deploy is going now!

sfackler added a commit to sfackler/cargo that referenced this pull request Jul 12, 2017
bors added a commit to rust-lang/cargo that referenced this pull request Jul 12, 2017
@jonhoo jonhoo mentioned this pull request Jul 11, 2019
bors added a commit that referenced this pull request Jul 16, 2019
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.

4 participants