-
Notifications
You must be signed in to change notification settings - Fork 41
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 if all PR files are in the same folder #60
Comments
It might make sense to only enable this via arg parameters. |
@enen92 For this we can check if upper directory for all the file is same or not right ? |
@mzfr Isn't it easier to:
>> relative_path = Path('/home/ci/addons/plugin.video.test/resources/lib/addon.py').relative_to(addon_dir)
>> print(relative_path)
<< PosixPath('plugin.video.test/resources/lib/addon.py')
>> relative_path.parts[0]
<< 'plugin.video.test'
|
@enen92 sorry thats what I meant by "upper directory". But you explained it in detail. Thank you |
I'm not sure about thise, especially if we need to call the github api. It means we add another hard dependency and very closely couple this checker with our repo rules on prs. Not with good rules for coding. So if we would run this locally with vscode some day it will just tilt untill we do some weird setup. Maybe it's a different concern and would be better of in it's own tool? |
add the following to .travis.yml |
No, I haven't updated our travis scripts yet |
If you can tell me for what all branches travis script are to need to be updated then I can do it 🙂 |
Well we need to add the stuff posted by rechi above and maybe also add the needed travis-buddy command, that I already added as a test on the plugins repo for the krypton branch. |
@razzeee any updates on this one ? |
@Rechi is that code snippet still how it should look? |
Yes, but it would mark some of our own PRs in repo-resources as failed (e.g. mass updates to game.controler.*). |
So we might want to not do this I guess. |
I think we still need this, mass updates to addons are not common and are usually handled only by team members. In most situations 1 PR = 1 addon update. Would it be possible to add a label to a pull request and make travis ignore the check? Something like the "No-Jenkins" label in Jenkins? |
Here is the script which just checks every commit of a PR separately.
|
@Rechi This script is all we need to add in the |
According to our submissions rules every pull request must refer to only one addon. PRs usually have "[addon.id] version" as the PR title (although in some cases we have to rename them manually or ask the author to do so).
Sometimes there is a mistake of including more than one addon in a pull request or of producing incorrect pull requests which include older commits (for example the result of an incorrect rebase).
The CI could check if all the files included in the pull request are constrained to a single folder (with the same name as the addon id); hence detecting if the pull request is valid.
All my issues are just possible features/ideas that come into my mind for the GSOC work on the tool. I can later implement some of them if not addressed during GSOC so please do not interpret them as I am demanding work :).
Regards
The text was updated successfully, but these errors were encountered: