| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 07c5594 commit 41cbc32
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,6 +8,7 @@ API objects manipulation | |||
| 8 | 8 | gl_objects/builds | |
| 9 | 9 | gl_objects/commits | |
| 10 | 10 | gl_objects/groups | |
| 11 | + gl_objects/issues | ||
| 11 | 12 | gl_objects/projects | |
| 12 | 13 | gl_objects/runners | |
| 13 | 14 | gl_objects/users | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ Build triggers | |||
| 7 | 7 | ||
| 8 | 8 | Use :class:`~gitlab.objects.ProjectTrigger` objects to manipulate build | |
| 9 | 9 | triggers. The :attr:`gitlab.Gitlab.project_triggers` and | |
| 10 | - :attr:`gitlab.objects.Projeect.triggers` manager objects provide helper | ||
| 10 | + :attr:`gitlab.objects.Project.triggers` manager objects provide helper | ||
| 11 | 11 | functions. | |
| 12 | 12 | ||
| 13 | 13 | Examples | |
@@ -42,7 +42,7 @@ Build variables | |||
| 42 | 42 | ||
| 43 | 43 | Use :class:`~gitlab.objects.ProjectVariable` objects to manipulate build | |
| 44 | 44 | variables. The :attr:`gitlab.Gitlab.project_variables` and | |
| 45 | - :attr:`gitlab.objects.Projeect.variables` manager objects provide helper | ||
| 45 | + :attr:`gitlab.objects.Project.variables` manager objects provide helper | ||
| 46 | 46 | functions. | |
| 47 | 47 | ||
| 48 | 48 | Examples | |
@@ -82,7 +82,7 @@ Builds | |||
| 82 | 82 | ====== | |
| 83 | 83 | ||
| 84 | 84 | Use :class:`~gitlab.objects.ProjectBuild` objects to manipulate builds. The | |
| 85 | - :attr:`gitlab.Gitlab.project_builds` and :attr:`gitlab.objects.Projeect.builds` | ||
| 85 | + :attr:`gitlab.Gitlab.project_builds` and :attr:`gitlab.objects.Project.builds` | ||
| 86 | 86 | manager objects provide helper functions. | |
| 87 | 87 | ||
| 88 | 88 | Examples | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,65 @@ | |||
| 1 | + # list | ||
| 2 | + issues = gl.issues.list() | ||
| 3 | + # end list | ||
| 4 | + | ||
| 5 | + # filtered list | ||
| 6 | + open_issues = gl.issues.list(state='opened') | ||
| 7 | + closed_issues = gl.issues.list(state='closed') | ||
| 8 | + tagged_issues = gl.issues.list(labels=['foo', 'bar']) | ||
| 9 | + # end filtered list | ||
| 10 | + | ||
| 11 | + # project issues list | ||
| 12 | + issues = gl.project_issues.list(project_id=1) | ||
| 13 | + # or | ||
| 14 | + issues = project.issues.list() | ||
| 15 | + # Filter using the state, labels and milestone parameters | ||
| 16 | + issues = project.issues.list(milestone='1.0', state='opened') | ||
| 17 | + # Order using the order_by and sort parameters | ||
| 18 | + issues = project.issues.list(order_by='created_at', sort='desc') | ||
| 19 | + # end project issues list | ||
| 20 | + | ||
| 21 | + # project issues get | ||
| 22 | + issue = gl.project_issues.get(issue_id, project_id=1) | ||
| 23 | + # or | ||
| 24 | + issue = project.issues.get(issue_id) | ||
| 25 | + # end project issues get | ||
| 26 | + | ||
| 27 | + # project issues create | ||
| 28 | + issue = gl.project_issues.create({'title': 'I have a bug', | ||
| 29 | + 'description': 'Something useful here.'}, | ||
| 30 | + project_id=1) | ||
| 31 | + # or | ||
| 32 | + issue = project.issues.create({'title': 'I have a bug', | ||
| 33 | + 'description': 'Something useful here.'}) | ||
| 34 | + # end project issues create | ||
| 35 | + | ||
| 36 | + # project issue update | ||
| 37 | + issue.labels = ['foo', 'bar'] | ||
| 38 | + issue.save() | ||
| 39 | + # end project issue update | ||
| 40 | + | ||
| 41 | + # project issue open_close | ||
| 42 | + # close an issue | ||
| 43 | + issue.state_event = 'close' | ||
| 44 | + issue.save() | ||
| 45 | + # reopen it | ||
| 46 | + issue.state_event = 'reopen' | ||
| 47 | + issue.save() | ||
| 48 | + # end project issue open_close | ||
| 49 | + | ||
| 50 | + # project issue delete | ||
| 51 | + gl.project_issues.delete(issue_id, project_id=1) | ||
| 52 | + # or | ||
| 53 | + project.issues.delete(issue_id) | ||
| 54 | + # pr | ||
| 55 | + issue.delete() | ||
| 56 | + # end project issue delete | ||
| 57 | + | ||
| 58 | + # project issue subscribe | ||
| 59 | + issue.subscribe() | ||
| 60 | + issue.unsubscribe() | ||
| 61 | + # end project issue subscribe | ||
| 62 | + | ||
| 63 | + # project issue move | ||
| 64 | + issue.move(new_project_id) | ||
| 65 | + # end project issue move | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,84 @@ | |||
| 1 | + ###### | ||
| 2 | + Issues | ||
| 3 | + ###### | ||
| 4 | + | ||
| 5 | + Reported issues | ||
| 6 | + =============== | ||
| 7 | + | ||
| 8 | + Use :class:`~gitlab.objects.Issues` objects to manipulate issues the | ||
| 9 | + authenticated user reported. The :attr:`gitlab.Gitlab.issues` manager object | ||
| 10 | + provides helper functions. | ||
| 11 | + | ||
| 12 | + Examples | ||
| 13 | + -------- | ||
| 14 | + | ||
| 15 | + List the issues: | ||
| 16 | + | ||
| 17 | + .. literalinclude:: issues.py | ||
| 18 | + :start-after: # list | ||
| 19 | + :end-before: # end list | ||
| 20 | + | ||
| 21 | + Use the ``state`` and ``label`` parameters to filter the results. Use the | ||
| 22 | + ``order_by`` and ``sort`` attributes to sort the results: | ||
| 23 | + | ||
| 24 | + .. literalinclude:: issues.py | ||
| 25 | + :start-after: # filtered list | ||
| 26 | + :end-before: # end filtered list | ||
| 27 | + | ||
| 28 | + Project issues | ||
| 29 | + ============== | ||
| 30 | + | ||
| 31 | + Use :class:`~gitlab.objects.ProjectIssue` objects to manipulate issues. The | ||
| 32 | + :attr:`gitlab.Gitlab.project_issues` and :attr:`Project.issues | ||
| 33 | + <gitlab.objects.Project.issues>` manager objects provide helper functions. | ||
| 34 | + | ||
| 35 | + Examples | ||
| 36 | + -------- | ||
| 37 | + | ||
| 38 | + List the project issues: | ||
| 39 | + | ||
| 40 | + .. literalinclude:: issues.py | ||
| 41 | + :start-after: # project issues list | ||
| 42 | + :end-before: # end project issues list | ||
| 43 | + | ||
| 44 | + Get a project issue: | ||
| 45 | + | ||
| 46 | + .. literalinclude:: issues.py | ||
| 47 | + :start-after: # project issues get | ||
| 48 | + :end-before: # end project issues get | ||
| 49 | + | ||
| 50 | + Create a new issue: | ||
| 51 | + | ||
| 52 | + .. literalinclude:: issues.py | ||
| 53 | + :start-after: # project issues create | ||
| 54 | + :end-before: # end project issues create | ||
| 55 | + | ||
| 56 | + Update an issue: | ||
| 57 | + | ||
| 58 | + .. literalinclude:: issues.py | ||
| 59 | + :start-after: # project issue update | ||
| 60 | + :end-before: # end project issue update | ||
| 61 | + | ||
| 62 | + Close / reopen an issue: | ||
| 63 | + | ||
| 64 | + .. literalinclude:: issues.py | ||
| 65 | + :start-after: # project issue open_close | ||
| 66 | + :end-before: # end project issue open_close | ||
| 67 | + | ||
| 68 | + Delete an issue: | ||
| 69 | + | ||
| 70 | + .. literalinclude:: issues.py | ||
| 71 | + :start-after: # project issue delete | ||
| 72 | + :end-before: # end project issue delete | ||
| 73 | + | ||
| 74 | + Subscribe / unsubscribe from an issue: | ||
| 75 | + | ||
| 76 | + .. literalinclude:: issues.py | ||
| 77 | + :start-after: # project issue subscribe | ||
| 78 | + :end-before: # end project issue subscribe | ||
| 79 | + | ||
| 80 | + Move an issue to another project: | ||
| 81 | + | ||
| 82 | + .. literalinclude:: issues.py | ||
| 83 | + :start-after: # project issue move | ||
| 84 | + :end-before: # end project issue move | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -91,7 +91,7 @@ Archive/unarchive a project: | |||
| 91 | 91 | Events | |
| 92 | 92 | ------ | |
| 93 | 93 | ||
| 94 | - Use :class:`~gitlab.objects.ProjectEvent` objects to manipulate projects. The | ||
| 94 | + Use :class:`~gitlab.objects.ProjectEvent` objects to manipulate events. The | ||
| 95 | 95 | :attr:`gitlab.Gitlab.project_events` and :attr:`Project.events | |
| 96 | 96 | <gitlab.objects.Project.events>` manager objects provide helper functions. | |
| 97 | 97 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments