- Notifications
You must be signed in to change notification settings - Fork673
feat(api): add project templates#3057
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
6d203b3
to2056b2c
Comparecodecovbot commentedDec 7, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## main #3057 +/- ##==========================================+ Coverage 96.64% 96.67% +0.02%========================================== Files 95 95 Lines 6142 6197 +55 ==========================================+ Hits 5936 5991 +55 Misses 206 206
Flags with carried forward coverage won't be shown.Click here to find out more.
|
There was a problem hiding this 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@gerry-pratama, looks great! Just a nit on the naming and the tests, but I'm ok with this as well otherwise. These endpoints are definitely a bit funny on the GitLab side so makes sense to parametrize a bit.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
2056b2c
to24af304
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks again@gerry-pratama, looks great! I might squash this one as we use it for the changelog and users are mostly interested in the public API in the release notes. 🙇
0d41da3
intopython-gitlab:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Changes
Project template classes have been added to
objects/templates.py
and their respective managers added to theProject class inobjects/projects.py
to represent theproject templates API.The project merge request template, in particular, will facilitate creating merge requests with adescription template, like the following example:
Documentation and testing
Please consider whether this PR needs documentation and tests.This is not required, but highly appreciated:
docs/gl_objects/templates.rst
.docs/gl_objects/merge_requests.rst
has been updated to include an example of creating an MR with a default description template.tests/unit/objects/test_templates.py
has been added to test both instance and project templates.