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

refactor: separate update generation #9788

Merged
merged 6 commits into from Apr 30, 2021
Merged

refactor: separate update generation #9788

merged 6 commits into from Apr 30, 2021

Conversation

rarkins
Copy link
Collaborator

@rarkins rarkins commented Apr 29, 2021

Changes:

Refactors update generation into a separate file.

Context:

Improvements before an upcoming feature.

Documentation (please check one with an [x])

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

How I've tested my work (please tick one)

I have verified these changes via:

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

@@ -170,12 +170,10 @@ Object {

exports[`workers/repository/process/lookup/index .lookupUpdates() handles git submodule update 1`] = `
Object {
"currentVersion": undefined,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Need to check this isn't a mistake

Copy link
Member

Choose a reason for hiding this comment

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

It's because you moved the versioning.valueToVersion call to inside the isValid condition and git submodules don't have a current value.

@JamieMagee Maybe we should pass the tracking branch as current value and add a git versioning, which allows branches / tags as version?

Copy link
Member

Choose a reason for hiding this comment

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

So we call valueToVersion now only on valid currentValue. Maybe we should mark this pr as feature, as it causes a bahavior change here.

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.

More detailed check tomorrow

lib/workers/repository/process/lookup/generate.ts Outdated Show resolved Hide resolved
lib/workers/repository/process/lookup/generate.ts Outdated Show resolved Hide resolved
lib/workers/repository/process/lookup/generate.ts Outdated Show resolved Hide resolved
@@ -170,12 +170,10 @@ Object {

exports[`workers/repository/process/lookup/index .lookupUpdates() handles git submodule update 1`] = `
Object {
"currentVersion": undefined,
Copy link
Member

Choose a reason for hiding this comment

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

It's because you moved the versioning.valueToVersion call to inside the isValid condition and git submodules don't have a current value.

@JamieMagee Maybe we should pass the tracking branch as current value and add a git versioning, which allows branches / tags as version?

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@rarkins rarkins requested a review from viceice April 30, 2021 07:22
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.

LGTM, but see comment

@@ -170,12 +170,10 @@ Object {

exports[`workers/repository/process/lookup/index .lookupUpdates() handles git submodule update 1`] = `
Object {
"currentVersion": undefined,
Copy link
Member

Choose a reason for hiding this comment

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

So we call valueToVersion now only on valid currentValue. Maybe we should mark this pr as feature, as it causes a bahavior change here.

@rarkins
Copy link
Collaborator Author

rarkins commented Apr 30, 2021

I've reverted that change so that snapshots remain the same. Will make such a change in a different PR if it's necessary.

@rarkins rarkins requested a review from viceice April 30, 2021 07:51
@rarkins rarkins merged commit 6ad1a33 into main Apr 30, 2021
@rarkins rarkins deleted the refactor/generate-update branch April 30, 2021 08:46
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 25.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2021
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.

None yet

3 participants