-
Notifications
You must be signed in to change notification settings - Fork 669
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api): add project templates #3057
Conversation
6d203b3
to
2056b2c
Compare
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.
2056b2c
to
24af304
Compare
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 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. 🙇
Changes
Project template classes have been added to
objects/templates.py
and their respective managers added to the Project class inobjects/projects.py
to represent the project templates API.The project merge request template, in particular, will facilitate creating merge requests with a description 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.