| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5945537 commit d6fa94e
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -393,3 +393,10 @@ | |||
| 393 | 393 | "body": "See the [attached file]({})".format(uploaded_file["url"]) | |
| 394 | 394 | }) | |
| 395 | 395 | # end project file upload markdown custom | |
| 396 | + | ||
| 397 | + # users list | ||
| 398 | + users = p.users.list() | ||
| 399 | + | ||
| 400 | + # search for users | ||
| 401 | + users = p.users.list(search='pattern') | ||
| 402 | + # end users list | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -160,6 +160,12 @@ Get a list of contributors for the repository: | |||
| 160 | 160 | :start-after: # repository contributors | |
| 161 | 161 | :end-before: # end repository contributors | |
| 162 | 162 | ||
| 163 | + Get a list of users for the repository: | ||
| 164 | + | ||
| 165 | + .. literalinclude:: projects.py | ||
| 166 | + :start-after: # users list | ||
| 167 | + :end-before: # end users list | ||
| 168 | + | ||
| 163 | 169 | Project files | |
| 164 | 170 | ============= | |
| 165 | 171 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1616,6 +1616,17 @@ class ProjectTriggerManager(CRUDMixin, RESTManager): | |||
| 1616 | 1616 | _update_attrs = (('description', ), tuple()) | |
| 1617 | 1617 | ||
| 1618 | 1618 | ||
| 1619 | + class ProjectUser(User): | ||
| 1620 | + pass | ||
| 1621 | + | ||
| 1622 | + | ||
| 1623 | + class ProjectUserManager(ListMixin, RESTManager): | ||
| 1624 | + _path = '/projects/%(project_id)s/users' | ||
| 1625 | + _obj_cls = ProjectUser | ||
| 1626 | + _from_parent_attrs = {'project_id': 'id'} | ||
| 1627 | + _list_filters = ('search',) | ||
| 1628 | + | ||
| 1629 | + | ||
| 1619 | 1630 | class ProjectVariable(SaveMixin, ObjectDeleteMixin, RESTObject): | |
| 1620 | 1631 | _id_attr = 'key' | |
| 1621 | 1632 | ||
@@ -1795,6 +1806,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject): | |||
| 1795 | 1806 | ('services', 'ProjectServiceManager'), | |
| 1796 | 1807 | ('snippets', 'ProjectSnippetManager'), | |
| 1797 | 1808 | ('tags', 'ProjectTagManager'), | |
| 1809 | + ('users', 'ProjectUserManager'), | ||
| 1798 | 1810 | ('triggers', 'ProjectTriggerManager'), | |
| 1799 | 1811 | ('variables', 'ProjectVariableManager'), | |
| 1800 | 1812 | ) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments