Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to get short project description?#1990

mbanders started this conversation inGeneral
Apr 27, 2022· 2 comments· 3 replies
Discussion options

Description of the problem, including code/CLI snippet

I readhttps://python-gitlab.readthedocs.io/en/stable/gl_objects/projects.html

But I didn't find a reference to the short project "description".

The gitlab API mentions a short "description" for Projects here:https://docs.gitlab.com/ee/api/projects.html#create-project
I think that the same as using the web interface Settings -> General -> Project description.

Can we retrieve this short description using python-gitlab?

Expected Behavior

Be able to retrieve the short project description.

Actual Behavior

Specifications

  • python-gitlab version: 3.3.0
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): 14.9
You must be logged in to vote

Replies: 2 comments 3 replies

Comment options

I'm not sure off the top of my head. But one thing that can help is to do:

project = gl.projects.get(PROJECT_ID)project.pprint()
You must be logged in to vote
3 replies
@JohnVillalovos
Comment options

Based on the GitLab docshttps://docs.gitlab.com/ee/api/projects.html#get-single-project

Looks like it should be in thedescription field, if a short description has been set. Looks like it can be missing.

project = gl.projects.get(PROJECT_ID)print(project.description)
@nejch
Comment options

Yeah that should be it :) just a little typo there,gl.projects.get(PROJECT_ID).

@JohnVillalovos
Comment options

Yeah that should be it :) just a little typo there,gl.projects.get(PROJECT_ID).

Thanks! Updated my original comment to add the correction. Whoops!

Comment options

Thank for the help! And good tips. I'll be able to explore more with that.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
3 participants
@mbanders@JohnVillalovos@nejch
Converted from issue

This discussion was converted from issue #1989 on April 27, 2022 19:42.


[8]ページ先頭

©2009-2025 Movatter.jp