8000 adds project upload feature by d0c-s4vage · Pull Request #239 · python-gitlab/python-gitlab · GitHub
[go: up one dir, main page]

Skip to content

adds project upload feature #239

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

Merged

Conversation

d0c-s4vage
Copy link
Contributor

Needs unit tests still. see #56

@d0c-s4vage
Copy link
Contributor Author

Attaching files to issues and issue notes seems to be working well though, now I'm trying to figure out the best way to do unit tests for this.

@gpocentek
Copy link
Contributor

Cool addition 👍

I need a bit more time to test/digest the code. If you spend time on this I'd rather have functional tests to get examples of how to use the code (tools/python_test.py).

Thanks you!

@d0c-s4vage
Copy link
Contributor Author
d0c-s4vage commented Mar 21, 2017 via email

@aruiz
Copy link
aruiz commented May 6, 2017

Any updates on this?

@gpocentek
Copy link
Contributor

@aruiz Sorry but I didn't have enough time to properly review and test this patch. Hopefully things will get better soon.

@d0c-s4vage
Copy link
Contributor Author

Is there anything else we need to do on this? Finally getting back to it

@gpocentek
Copy link
Contributor

Hi @d0c-s4vage, sorry for not answering sooner.

I didn't take time to test an upload yet, but the code itself seems OK to me.

I'm not sure that python-gitlab should be responsible of adding the markdown in the issues/notes description. User will probably want to handle that part themselves (at the beginning, at the end, new note or existing one, ...). The Mixin class is probably not needed

If you have time to implement this for v4 it would be great, but I can take care of it if you don't.

Thanks for adding this feature!

@d0c-s4vage
Copy link
Contributor Author

@gpocentek ah, great point on that. It's been a while since I've looked at my changes... I'll make the file upload/attachment a stand-alone feature that can return/generate markdown for the user.

@d0c-s4vage
Copy link
Contributor Author
d0c-s4vage commented Aug 22, 2017

well crap, that rebase didn't work out how I thought it would. SHould've merged instead of rebased.

@d0c-s4vage d0c-s4vage force-pushed the feature-project_uploads-56 branch from eab48ce to 1ce40a3 Compare August 22, 2017 17:42
@d0c-s4vage
Copy link
Contributor Author

Feature branch is now up-to-date with latest from python-gitlab/python-gitlab

see python-gitlab#56

* file uploads are not directly associated with issues/notes
* should work with v3 and v4 apis
* CLIs seem to be working
@d0c-s4vage
Copy link
Contributor Author

@gpocentek pending review/comments, I think this is done

@d0c-s4vage d0c-s4vage changed the title [WIP] added project upload features. adds project upload feature Aug 23, 2017
@gpocentek
Copy link
Contributor

Thanks for the update! I really appreciate the docs and tests! :)

It looks pretty good to me, I'm just wondering if the InformationalObject class is really useful. Making the upload() method return a simple dict (the Gitlab server data) seems good and simple enough to me. Maybe there's a useful goal I didn't catch there, but I believe in simple things ;)

@d0c-s4vage
Copy link
Contributor Author

Hrmm, good point. I made the InformationalObject and the ProjectUpload classes so that the v4 cli result printing code would work with fewer changes. It would have been simpler to add a new case to print a dict I guess. I'll use that, remove the InformationalObject and ProjectUpload classes, and just return a dict from the upload() method.

Also, I don't know why the build is failing on python2.7 cli_func_v4. I'll take another look and see if my code interfered with branch creation somehow:
image

@d0c-s4vage
Copy link
Contributor Author

@gpocentek w00t! all tests are passing, I think this is good to go now.

@gpocentek gpocentek merged commit 29879d6 into python-gitlab:master Sep 12, 2017
@gpocentek
Copy link
Contributor

Thank for your patience and the quality of this patch!

@d0c-s4vage
Copy link
Contributor Author

Awesome! We're glad to contribute - we use python-gitlab pretty heavily

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.

3 participants
0