# List commits

`GET /workspaces/:workspace/projects/:project_name/repository/pulls/:number/commits`

Returns the commits of a single pull request

**Required Scopes:** `REPOSITORY_READ`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
  /** The human-readable ID of the project */
  project_name: string; // Example: "my-project"
  /** The pull request number */
  number: number; // Example: 5
}
```

## Response Body

```typescript
interface ResponseBody {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  commits?: ShortCommitView[];
}
```

## Type Definitions

```typescript
interface ShortCommitView {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The full SHA hash of the commit */
  revision?: string;
  /** The date when the commit was authored */
  author_date?: string;
  /** The date when the commit was committed */
  commit_date?: string;
  /** The short SHA hash of the commit (first 7 characters) */
  short_revision?: string;
  /** The commit message */
  message?: string;
  /** User/member reference */
  committer?: MemberView;
  /** User/member reference */
  author?: MemberView;
}

interface MemberView {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The ID of the user */
  id?: number;
  /** The name of the user */
  name?: string;
  /** The unique username of the user */
  username?: string;
  /** The avatar URL of the user */
  avatar_url?: string;
  /** The email address of the user */
  email?: string;
  /** Whether the user has admin privileges */
  admin?: boolean;
  /** Whether the user is workspace owner */
  workspace_owner?: boolean;
}

```

## Response Example

**Status:** `200 OK`


---
Original source: https://buddy.works/docs/api/version-control/pull-requests/list-commits