1

So I'm creating projects and deleting them by python script using the gitlab python API. That part is working. But a colleague started adding some avatars to some of my autoprojects that I found amusing and wanted to save them and restore them. But I can't figure out how to do that using the api.

The gitlab python api docs for 3.10.0 says there should be a project.avatar attribute I can write to to save it. So I assumed it would also work for reading. But instead there doesn't seem to be the attribute at all when I retrieve the project object.

I'm not wed to using the python api but I can't figure out how to download the avatar using requests either (this isn't something I normally do so I'm fairly green at this part.) I found an answer on uploading at this answer here but can't figure out how to reverse it.

This is one of those "easy" things that was supposed to be a silly twist. Do I have to just blow away his work?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.