-
Notifications
You must be signed in to change notification settings - Fork 156
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
[#1459] do not merge in case .rultor file is in PR #1865
Conversation
pnatashap
commented
Feb 8, 2024
- logic is added
- test is disabled, as MkPull doesn't allow to work with files (too many code to write without it)
@yegor256 please take a look |
} else | ||
if (pull.allChecksSuccessful()) { | ||
new Answer(comment).post( | ||
true, |
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.
@pnatashap indentation here is definitely wrong (not 4 spaces), but I can't understand why Qulice is not complaining about this...
@@ -36,6 +36,8 @@ QnMerge.checks-are-failed=Can't merge it. Some CI checks were failed. \ | |||
Apparently, the pull request is not ready to be \ | |||
merged since it has some problems. \ | |||
Please, fix them first. | |||
QnMerge.system-files-affected=Can't merge it. File `.rultor.yml` is affected by \ | |||
this pull request. |
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.
@pnatashap would be great if we can explain to the user, why we don't accept modifications to this particular file. Let's say: "Can't merge this pull requests, because the file .rultor.yml
was modified. This is a security threat. Make a separate pull request with the modification of this particular file and ask project architect to merge it manually."
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.
@pnatashap also, I think it's better not to hardcode the name of the file here, but use %s
and pass the name of it as a parameter to String.format
Matchers.containsString( | ||
QnMergeTest.PHRASES.getString( | ||
"QnMerge.system-files-affected" | ||
) |
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.
@pnatashap indentations here are also unusual, but Qulice doesn't complain... very strange.
@pnatashap many thanks for the contribution! see my comments above |
@yegor256 please take a look. |
@rultor merge |