FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

adds project upload feature by d0c-s4vage · Pull Request #239 · python-gitlab/python-gitlab · GitHub

Repository navigation

adds project upload feature - #239

Merged
gpocentek merged 8 commits into
python-gitlab:masterfrom
ExodusIntelligence:feature-project_uploads-56
Sep 12, 2017
Merged

gpocentek merged 8 commits into
python-gitlab:masterfrom
ExodusIntelligence:feature-project_uploads-56

Conversation

Copy link
Copy Markdown
Contributor

Needs unit tests still. see #56

Copy link
Copy Markdown
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.

Copy link
Copy Markdown
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 commented Mar 21, 2017 via email

Copy link
Copy Markdown
Contributor Author

aruiz commented May 6, 2017

Copy link
Copy Markdown

Any updates on this?

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
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!

Copy link
Copy Markdown
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 commented Aug 22, 2017 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

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

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

Copy link
Copy Markdown
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

Copy link
Copy Markdown
Contributor Author

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

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

Copy link
Copy Markdown
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 ;)

Copy link
Copy Markdown
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:

Copy link
Copy Markdown
Contributor Author

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

gpocentek merged commit 29879d6 into python-gitlab:master Sep 12, 2017

Copy link
Copy Markdown
Contributor

Thank for your patience and the quality of this patch!

Copy link
Copy Markdown
Contributor Author

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

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL