Skip to content

Conversation

abhishekmsingh
Copy link
Contributor

Closes #2356

@abhishekmsingh
Copy link
Contributor Author

abhishekmsingh commented Nov 1, 2022

@max-wittig @nejch can you review this PR please? Pretty similar to #2348
There is again a bit of replicated code from import_project function. Can't find a way to refactor it because it is quite small and creating any common entity just feals like overkill. Let me know if anyone has a way to go over it, else I think this much replication might be tolerable.

Copy link
Member

@nejch nejch left a comment

Choose a reason for hiding this comment

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

Looks great @abhiandthetruth thanks for the quick work again. Just a few quick notes :)

There is again a bit of replicated code from import_project function. Can't find a way to refactor it because it is quite small and creating any common entity just feals like overkill. Let me know if anyone has a way to go over it, else I think this much replication might be tolerable.

I agree, no need yet. We have plenty of other custom methods where this is an issue as well.

I think it would need a lot of rework but another decorator with required/optional payload attributes might make these methods more declarative instead of parsing args inside every method. Something like #1999 if we revive that at some point.

@abhishekmsingh
Copy link
Contributor Author

@nejch implemented the suggested changes.

Copy link
Member

@nejch nejch left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this @abhiandthetruth, as you seem keen on contributing more later I added a small non-blocking note for a potential follow-up :) LGTM!

@nejch nejch merged commit 892281e into python-gitlab:main Nov 2, 2022
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.

Add support from remote project import from S3

2 participants