Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[tool] Bypass version/changelog checks for some PRs #6124

Merged
merged 2 commits into from
Jul 20, 2022

Conversation

stuartmorgan-g
Copy link
Contributor

Dependabot PRs currently always need manual intervention to add either
version/CHANGELOG bumps, or overriddes so that they can be landed
without them, which adds friction to landing those PRs.

Several commonly-updated dependencies are only for internal testing, so
never need version or CHANGELOG changes. This adds an explict allow-list
for Dependabot PRs for those packages to automatically bypass the usual
checks for missing updates, to make them easier to land.

Fixes flutter/flutter#107942

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/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin 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.

Dependabot PRs currently always need manual intervention to add either
version/CHANGELOG bumps, or overriddes so that they can be landed
without them, which adds friction to landing those PRs.

Several commonly-updated dependencies are only for internal testing, so
never need version or CHANGELOG changes. This adds an explict allow-list
for Dependabot PRs for those packages to automatically bypass the usual
checks for missing updates, to make them easier to land.

Fixes flutter/flutter#107942
Copy link
Contributor

@camsim99 camsim99 left a comment

Choose a reason for hiding this comment

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

Looks good, just a nit and a question!


// A string that is in all Dependabot PRs, but extreemly unlikely to be in
// any other PR, to identify Dependabot PRs.
const String dependabotMarker = 'Dependabot commands and options';
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm sure this should work in practice, but have you considered a more deterministic way to ensure a PR is a dependabot PR? It doesn't seem like you can configure the PR description, though, so this may be the best way for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, this is not a great solution. I was hoping when I started implementing this that there would be a CIRRUS_* variable for the author, but unfortunately there isn't, so the only way I could see to get it would be much more complicated (taking the CIRRUS_PR and trying to extract the information from the GitHub API).

Given that, and that we can easily update the tool if Dependabot PR format changes, I figured this was probably a reasonable starting point, and then if it turns out to need a lot of maintenance in practice we can revisit. Longer term, I was thinking we may want to explore moving some checks like this one to infra's cocoon tool, which already has a lot of utilities for using the GitHub API to look at PR state; using PR description for doing overrides in the first place was always kind of a hack (and has proved less reliable than expected in other ways).

Since the failure case here is needing human intervention (rather than silently allowing incorrect changes), I'm more comfortable with it being more fragile than most of the repo tooling.

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 20, 2022
@auto-submit auto-submit bot merged commit 9beb9a6 into flutter:main Jul 20, 2022
@stuartmorgan-g stuartmorgan-g deleted the tool-dependabot-allow-list branch July 20, 2022 20:18
stuartmorgan-g added a commit to stuartmorgan-g/plugins that referenced this pull request Jul 20, 2022
Follow-up to flutter#6124; that version
works if the tooling actually gets the PR description, but due to
cirruslabs/cirrus-ci-docs#1029 we may get the
commit message instead, so we need to detect that as well.

Part of flutter/flutter#107942
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 21, 2022
yutaaraki-toydium pushed a commit to yutaaraki-toydium/plugins that referenced this pull request Aug 12, 2022
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[plugins] Create a publishable allow-list for certain dependabot PRs
2 participants