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: extract and update now decoupled #5835

Conversation

YuraBeznos
Copy link
Contributor

Refactor: move changelog retrieval to post-lookup / pre-commit

Closes #5774

@lgtm-com
Copy link

lgtm-com bot commented Mar 30, 2020

This pull request introduces 1 alert when merging 13c3369 into f25ae78 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

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.

Please fix ci issues

Part of osp-cfc-platform/backlog#
@YuraBeznos
Copy link
Contributor Author

Please fix ci issues

@viceice fixed.

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.

Some unit tests failing

@YuraBeznos
Copy link
Contributor Author

Yeah, still trying to understand how to move out getChangelogJSON out of update.

@lgtm-com
Copy link

lgtm-com bot commented Apr 7, 2020

This pull request introduces 1 alert when merging fa19cc7 into fd329d1 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

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.

Needs test fixes including lint

@YuraBeznos
Copy link
Contributor Author

Needs test fixes including lint

Done.

branches = branches.concat(baseBranchRes.branches);
branchList = branchList.concat(baseBranchRes.branchList);
}
return { res, branches, branchList };
return { branches, branchList };
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems to be skipping packageFiles as expected by the calling function: const { branches, branchList, packageFiles } = await processRepo(config);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

packageFiles variable was ignored before my changes in this place, so that is why I made it like that
Do we need it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's referenced in const additionalFiles = await getAdditionalFiles(config, packageFiles);

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, but exactly in this place packageFiles was ignored.
Lets look in the master branch:

only res, branches and branchList are returned.

That is why packageFiles is optional parameter in ExtractResult (and was optional before me).

What I'm trying to protect is that this PR is just refactoring, without changing overall logic behind it.

And additional changes going to be features or bug fixes and not related to this PR itself.

@rarkins
Copy link
Collaborator

rarkins commented Apr 13, 2020

Hi @YuraBeznos, I attempted to fix the conflict but I don't have push permissions to your repo. Could you merge from master, resolve the conflict, then push to github?

@@ -9,16 +9,17 @@ import { PackageFile } from '../../../manager/common';
import { RenovateConfig } from '../../../config';
import { BranchConfig } from '../../common';

export type ExtractAndUpdateResult = {
res: WriteUpdateResult | undefined;
export type ExtractResult = {
branches: BranchConfig[];
branchList: string[];
packageFiles?: Record<string, PackageFile[]>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
packageFiles?: Record<string, PackageFile[]>;
packageFiles: Record<string, PackageFile[]>;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I'm against it. #5835 (comment)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't agree, but if they're ignored them remove them completely?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is ignored in one place and in use in another. And that how it works in master right now, without that PR.

If this is a bug, lets fix it in different PR.

config: RenovateConfig,
branches: BranchConfig[],
branchList: string[],
packageFiles?: Record<string, PackageFile[]>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
packageFiles?: Record<string, PackageFile[]>
packageFiles: Record<string, PackageFile[]>

@YuraBeznos
Copy link
Contributor Author

Hi @YuraBeznos, I attempted to fix the conflict but I don't have push permissions to your repo. Could you merge from master, resolve the conflict, then push to github?

Done.

@rarkins rarkins merged commit f04adc5 into renovatebot:master Apr 14, 2020
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 19.208.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

rarkins added a commit that referenced this pull request Apr 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
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.

Refactor: move changelog retrieval to post-lookup / pre-commit
4 participants