-
Notifications
You must be signed in to change notification settings - Fork 87
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
base: master
Are you sure you want to change the base?
Check renamed change files #580
Conversation
@@ -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}"`); |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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:
- Create a new more descriptive function while keeping the current one and marking it for deprecation in the future.
- 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?
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.)
This PR checks whether change files have been renamed and might solve #579