Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Conversation

@athomas
Copy link
Contributor

@athomas athomas commented Dec 21, 2020

No description provided.

@athomas athomas requested a review from kevmoo December 21, 2020 13:53
@google-cla google-cla bot added the cla: yes label Dec 21, 2020
README.md Outdated
@@ -1,5 +1,5 @@
[![Pub package](https://img.shields.io/pub/v/code_builder.svg)](https://pub.dev/packages/code_builder)
[![Build status](https://travis-ci.org/dart-lang/code_builder.svg)](https://travis-ci.org/dart-lang/code_builder)
[![Build Status](https://github.com/dart-lang/code_builder/workflows/Dart%20CI/badge.svg)](https://github.com/dart-lang/code_builder/actions?query=workflow%3A"Dart+CI")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure to refence to the master branch for both the image and the link – or you get weird output

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, not sure I understand this. The image points to the default branch (=master) for the workflow (the doc says that if you don't specify a branch you get the default branch). The search Link shows all results for the workflow, that seems to be what people are doing in general (often the link is just to the actions tab, without a filter on the workflow or branch, e.g. https://github.com/dart-lang/build/actions).

Or do you mean a completely specific link like this?
https://github.com/dart-lang/build/actions?query=workflow%3A%22Dart+CI%22+branch%3Amaster+event%3Apush

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just pushed the change.

Otherwise you get a green status if the last push to a branch was green, even if it wasn't master!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise you get a green status if the last push to a branch was green, even if it wasn't master!

Not true, but it was on Travis. GitHub Actions badges default to using the default branch (master in old repos, main in newer/migrated repos) when no specific branch is specified.

See https://github.com/athomas/github-actions-playground, where the badge is green but the latest result is on the always-fail branch.

By default, badges display the status of your default branch.

Travis badges don't have a default branch concept, so you needed to specify the master branch to avoid weirdness. Not using the branch explicitly on GitHub Actions makes future default branch migrations (master -> main) slightly easier.

@kevmoo kevmoo merged commit 7203e37 into master Dec 26, 2020
@kevmoo kevmoo deleted the github-actions branch December 26, 2020 16:29
mosuem pushed a commit to dart-lang/tools that referenced this pull request Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants