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

Check renamed change files #580

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

LarryKiniu
Copy link

@LarryKiniu LarryKiniu commented Aug 12, 2021

This PR checks whether change files have been renamed and might solve #579

@@ -17,12 +17,12 @@ export function areChangeFilesDeleted(options: BeachballOptions): boolean {
process.exit(1);
}

console.log(`Checking for deleted change files against "${branch}"`);
console.log(`Checking for deleted and renamed change files against "${branch}"`);
Copy link
Member

Choose a reason for hiding this comment

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

I think it would make sense to rename the function too: areChangeFilesDeletedOrRenamed. A bit on verbose side, but reflects the purpose of the function :)

Copy link
Author

Choose a reason for hiding this comment

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

I suppose that would be more descriptive. However, it will break the API. There are a couple of options I can see to avoid this:

  1. Create a new more descriptive function while keeping the current one and marking it for deprecation in the future.
  2. Create a new method that just checks for renamed change files and calling it based on a flag like --disallow-renamed-change-files which can be used in conjunction with the current function.
    Which option should we go with - or are there other options?

Copy link
Member

Choose a reason for hiding this comment

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

I think option #2 makes more sense :)

Copy link
Member

Choose a reason for hiding this comment

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

@LarryKiniu This is an internal API, so you don't need to worry about breaking it. (I'm fine with either renaming the function or just going with this as-is.)

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.

None yet

4 participants