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

feat(config): migrate requiredStatusChecks to ignoreTests #11355

Merged
merged 11 commits into from Sep 12, 2021

Conversation

pret-a-porter
Copy link
Contributor

@pret-a-porter pret-a-porter commented Aug 20, 2021

Changes:

  1. Introduced abstract class Migration. Now any new migration should extend it
  2. Added migration from requiredStatusChecks to ignoreTests
  3. Unit tests were aligned to changes

Context:

Fixes #11163

Documentation

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@pret-a-porter pret-a-porter force-pushed the feat/ignore-tests branch 2 times, most recently from 06d3578 to 395bd46 Compare August 22, 2021 17:50
Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

@viceice @JamieMagee can you review if you think the migration class is the right approach going forward?

lib/workers/pr/automerge.ts Outdated Show resolved Hide resolved
@JamieMagee
Copy link
Contributor

I think it's a nice idea (I say as I'm currently migrating datasources to be classes 😅). I think it'll make them easier to write and test, as we can enforce things from the abstract Migrate class, and prevent lots of repeated boilerplate code.

lib/config/migration.ts Outdated Show resolved Hide resolved
lib/platform/types.ts Outdated Show resolved Hide resolved
lib/config/migrations/migration.ts Outdated Show resolved Hide resolved
lib/config/migration.ts Outdated Show resolved Hide resolved
lib/config/migrations/required-status-checks-migration.ts Outdated Show resolved Hide resolved
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

See other comment

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

Made some new suggestions, so the ignoreTests can be completly removed from platform.getBranchStatus code

lib/platform/types.ts Outdated Show resolved Hide resolved
lib/workers/branch/automerge.ts Outdated Show resolved Hide resolved
lib/workers/pr/automerge.ts Outdated Show resolved Hide resolved
lib/workers/pr/body/config-description.ts Show resolved Hide resolved
lib/workers/pr/body/config-description.ts Outdated Show resolved Hide resolved
lib/workers/pr/index.ts Outdated Show resolved Hide resolved
lib/workers/pr/index.ts Outdated Show resolved Hide resolved
lib/workers/branch/automerge.ts Show resolved Hide resolved
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

See my suggestions

@pret-a-porter
Copy link
Contributor Author

pret-a-porter commented Aug 28, 2021

@viceice Everything is done

@viceice
Copy link
Member

viceice commented Aug 28, 2021

Please use the re-request review button. 😉

viceice
viceice previously approved these changes Aug 28, 2021
@viceice
Copy link
Member

viceice commented Aug 31, 2021

@JamieMagee Any comments about the migration code? Any idea for optimizations / improvements here?

@pret-a-porter
Copy link
Contributor Author

@rarkins @JamieMagee can we merge this branch? Do you expect any changes/comments from my side?

rarkins
rarkins previously requested changes Sep 6, 2021
lib/workers/pr/automerge.ts Show resolved Hide resolved
lib/workers/branch/status-checks.ts Outdated Show resolved Hide resolved
@rarkins rarkins marked this pull request as draft September 6, 2021 13:06
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

needs deconflicting / snapshot updates

@pret-a-porter
Copy link
Contributor Author

Deconflicted

@JamieMagee JamieMagee marked this pull request as ready for review September 11, 2021 22:25
@JamieMagee
Copy link
Contributor

JamieMagee commented Sep 11, 2021

LGTM 👍

Will wait and give @viceice a chance to review.

@viceice viceice enabled auto-merge (squash) September 12, 2021 15:16
@viceice viceice dismissed rarkins’s stale review September 12, 2021 15:17

Requested changes applied

@viceice viceice merged commit 7801ae7 into renovatebot:main Sep 12, 2021
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 27.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2021
@pret-a-porter pret-a-porter deleted the feat/ignore-tests branch January 11, 2022 20:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate requiredStatusChecks to ignoreTests
5 participants