GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python-gitlab/docs/gl_objects/events.rst at main · python-gitlab/python-gitlab

Expand file tree

/

events.rst

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
83 lines (55 loc) · 2.19 KB
/

events.rst

Copy path

File metadata and controls

83 lines (55 loc) · 2.19 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Events

Events

Reference

  • v4 API:
    • :class:`gitlab.v4.objects.Event`
    • :class:`gitlab.v4.objects.EventManager`
    • :attr:`gitlab.Gitlab.events`
    • :class:`gitlab.v4.objects.ProjectEvent`
    • :class:`gitlab.v4.objects.ProjectEventManager`
    • :attr:`gitlab.v4.objects.Project.events`
    • :class:`gitlab.v4.objects.UserEvent`
    • :class:`gitlab.v4.objects.UserEventManager`
    • :attr:`gitlab.v4.objects.User.events`
  • GitLab API: https://docs.gitlab.com/api/events/

Examples

You can list events for an entire Gitlab instance (admin), users and projects. You can filter you events you want to retrieve using the action and target_type attributes. The possible values for these attributes are available on the gitlab documentation.

List all the events (paginated):

events = gl.events.list(get_all=True)

List the issue events on a project:

events = project.events.list(target_type='issue', get_all=True)

List the user events:

events = project.events.list(get_all=True)

Resource state events

Reference

  • v4 API:
    • :class:`gitlab.v4.objects.ProjectIssueResourceStateEvent`
    • :class:`gitlab.v4.objects.ProjectIssueResourceStateEventManager`
    • :attr:`gitlab.v4.objects.ProjectIssue.resourcestateevents`
    • :class:`gitlab.v4.objects.ProjectMergeRequestResourceStateEvent`
    • :class:`gitlab.v4.objects.ProjectMergeRequestResourceStateEventManager`
    • :attr:`gitlab.v4.objects.ProjectMergeRequest.resourcestateevents`
  • GitLab API: https://docs.gitlab.com/api/resource_state_events

Examples

You can list and get specific resource state events (via their id) for project issues and project merge requests.

List the state events of a project issue (paginated):

state_events = issue.resourcestateevents.list(get_all=True)

Get a specific state event of a project issue by its id:

state_event = issue.resourcestateevents.get(1)

List the state events of a project merge request (paginated):

state_events = mr.resourcestateevents.list(get_all=True)

Get a specific state event of a project merge request by its id:

state_event = mr.resourcestateevents.get(1)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.