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

Run scorecards only on pushes to main. #2546

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

godofredoc
Copy link
Contributor

This is to prevent the workflow from failing when running in branches
with no previous data to compare.

It also adds the scorecard badge to the README file.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

This is to prevent the workflow from failing when running in branches
with no previous data to compare.

It also adds the scorecard badge to the README file.
push:
branches: [ main ]
branches:
- main
Copy link
Contributor

Choose a reason for hiding this comment

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

Aren't these just different syntax for the same thing? Or is the fix the removal of the empty entry above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah not sure it the empty branch protection was causing this workflow to run on push of any branch.

Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

LGTM I guess, it's just not clear to me that this will actually fix it.

If it does, we need the same change in flutter/plugins.

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

Odd that we haven't seen this more often. Dependabot creates branches all the time that should be triggering this more often? (maybe?)

(Also, this will have to be merged with the submit-queue in red to attempt to fix it)

@godofredoc
Copy link
Contributor Author

Odd that we haven't seen this more often. Dependabot creates branches all the time that should be triggering this more often? (maybe?)

(Also, this will have to be merged with the submit-queue in red to attempt to fix it)

Yeah but dependabot is actually creating a PR in this case it was a direct push, should I disable that to make packages consistent with flutter/flutter and flutter/engine?

@stuartmorgan
Copy link
Contributor

I'm not aware of a reason we should have a different setup here than flutter/flutter and flutter/engine, so I'd be fine with aligning the configurations and seeing if anything breaks.

@godofredoc godofredoc merged commit 84d89af into flutter:main Sep 2, 2022
@ditman
Copy link
Member

ditman commented Sep 2, 2022

dependabot is actually creating a PR in this case it was a direct push, should I disable that to make packages consistent with flutter/flutter and flutter/engine?

No, I meant that dependabot creates branches in the repo to create their PRs, similar to the branch that was causing the error?

Anyway, the Scorecard is now passing on master, yay!

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