# Gitea

> Work with Gitea, Forgejo and Codeberg repositories: open, change and comment on issues, open and merge pull requests, publish releases, read and save files, and manage branches. Start a workflow for each new issue, pull request or release.

App · 23 actions. Web page: https://docs.lodol.com/docs/integrations/gitea

## Actions

### Add comment

Comment on an issue or pull request.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- Issue number (`issue_number`, text, required): The issue's or pull request's number, such as 42.
- Comment (`body`, text, required): The comment, in Markdown.

**Outputs**

- `author` (text): Who wrote it
- `body` (text): Its text, in Markdown
- `created_at` (text): When it was written (ISO 8601)
- `html_url` (text): Its address
- `id` (number): The comment's ID
- `updated_at` (text): When it was last edited (ISO 8601)

**Example output**

```json
{
  "author": "sam",
  "body": "Fixed in #43.",
  "created_at": "2026-10-21T09:00:00Z",
  "html_url": "https://gitea.example.com/acme/website/issues/42#issuecomment-901",
  "id": 901,
  "updated_at": "2026-10-21T09:00:00Z"
}
```

### Change issue

Change an issue or pull request: close or reopen it, rename it, or change its description, labels, assignees, milestone or due date. Empty fields are left as they are.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- Issue number (`issue_number`, text, required): The issue's or pull request's number, such as 42.
- State (`state`, text): Close or reopen it. One of: `open`, `closed`.
- Title (`title`, text): A new title.
- Description (`body`, text): A new description, in Markdown.
- Labels (`labels`, list): Its labels, replacing the ones it has.
- Assignees (`assignees`, list): People to assign, by user name.
- Milestone (`milestone`, text): The milestone, by its title.
- Due date (`due_date`, date): When it is due.

**Outputs**

- `assignees` (list): Who it is assigned to
- `author` (text): Who opened it
- `body` (text): Its description, in Markdown
- `closed_at` (text): When it was closed (ISO 8601); empty when open
- `comments` (number): How many comments it has
- `created_at` (text): When it was opened (ISO 8601)
- `due_date` (text): When it is due (ISO 8601); empty when not set
- `html_url` (text): Its page
- `labels` (list): Its labels' names
- `milestone` (text): Its milestone's title; empty when none
- `number` (number): Its number in the repository
- `state` (text): open or closed
- `title` (text): Its title
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "assignees": [
    "sam"
  ],
  "author": "jo",
  "body": "The 'Contact sales' link goes nowhere.",
  "closed_at": "2026-10-22T09:00:00Z",
  "comments": 2,
  "created_at": "2026-10-20T09:00:00Z",
  "due_date": "2026-10-31T00:00:00Z",
  "html_url": "https://gitea.example.com/acme/website/issues/42",
  "labels": [
    "bug"
  ],
  "milestone": "October",
  "number": 42,
  "state": "closed",
  "title": "Broken link on the pricing page",
  "updated_at": "2026-10-21T09:00:00Z"
}
```

### Create branch

Create a branch from another branch, or from the default one.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- New branch (`branch`, text, required): The new branch's name.
- From (`from_branch`, text): The branch to start from. Leave empty for the default branch.

**Outputs**

- `commit_message` (text): That commit's message
- `commit_sha` (text): Its latest commit
- `name` (text): The branch's name
- `protected` (true/false): True when it is protected

**Example output**

```json
{
  "commit_message": "Fix the pricing link",
  "commit_sha": "4f2a9c1d8e7b6a5f4e3d2c1b0a9f8e7d6c5b4a39",
  "name": "fix-link",
  "protected": false
}
```

### Create issue

Open an issue, with labels, assignees, a milestone and a due date if you like.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- Title (`title`, text, required): The issue's title.
- Description (`body`, text): What it is about, in Markdown.
- Labels (`labels`, list): Labels to add.
- Assignees (`assignees`, list): People to assign, by user name.
- Milestone (`milestone`, text): The milestone, by its title.
- Due date (`due_date`, date): When it is due.

**Outputs**

- `assignees` (list): Who it is assigned to
- `author` (text): Who opened it
- `body` (text): Its description, in Markdown
- `closed_at` (text): When it was closed (ISO 8601); empty when open
- `comments` (number): How many comments it has
- `created_at` (text): When it was opened (ISO 8601)
- `due_date` (text): When it is due (ISO 8601); empty when not set
- `html_url` (text): Its page
- `labels` (list): Its labels' names
- `milestone` (text): Its milestone's title; empty when none
- `number` (number): Its number in the repository
- `state` (text): open or closed
- `title` (text): Its title
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "assignees": [
    "sam"
  ],
  "author": "jo",
  "body": "The 'Contact sales' link goes nowhere.",
  "closed_at": "",
  "comments": 2,
  "created_at": "2026-10-20T09:00:00Z",
  "due_date": "2026-10-31T00:00:00Z",
  "html_url": "https://gitea.example.com/acme/website/issues/42",
  "labels": [
    "bug"
  ],
  "milestone": "October",
  "number": 42,
  "state": "open",
  "title": "Broken link on the pricing page",
  "updated_at": "2026-10-21T09:00:00Z"
}
```

### Create pull request

Open a pull request to merge one branch into another.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- From branch (`head`, text, required): The branch with the changes.
- Into branch (`base`, text, required): The branch to merge into, such as main.
- Title (`title`, text, required): The pull request's title.
- Description (`body`, text): What it changes, in Markdown.

**Outputs**

- `assignees` (list): Who it is assigned to
- `author` (text): Who opened it
- `base_branch` (text): The branch it merges into
- `body` (text): Its description, in Markdown
- `closed_at` (text): When it was closed (ISO 8601); empty when open
- `comments` (number): How many comments it has
- `created_at` (text): When it was opened (ISO 8601)
- `draft` (true/false): True while marked work in progress
- `due_date` (text): When it is due (ISO 8601); empty when not set
- `head_branch` (text): The branch with the changes
- `html_url` (text): Its page
- `labels` (list): Its labels' names
- `mergeable` (true/false): True when it can be merged without conflicts
- `merged` (true/false): True once merged
- `merged_at` (text): When it was merged (ISO 8601); empty when not
- `merged_by` (text): Who merged it
- `milestone` (text): Its milestone's title; empty when none
- `number` (number): Its number in the repository
- `state` (text): open or closed
- `title` (text): Its title
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "assignees": [
    "sam"
  ],
  "author": "jo",
  "base_branch": "main",
  "body": "The 'Contact sales' link goes nowhere.",
  "closed_at": "",
  "comments": 2,
  "created_at": "2026-10-20T09:00:00Z",
  "draft": false,
  "due_date": "2026-10-31T00:00:00Z",
  "head_branch": "fix-link",
  "html_url": "https://gitea.example.com/acme/website/pulls/43",
  "labels": [
    "bug"
  ],
  "mergeable": true,
  "merged": false,
  "merged_at": "",
  "merged_by": "",
  "milestone": "October",
  "number": 43,
  "state": "open",
  "title": "Fix the pricing link",
  "updated_at": "2026-10-21T09:00:00Z"
}
```

### Create release

Publish a release, creating its tag from a branch if the tag does not exist yet.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- Tag (`tag_name`, text, required): The release's tag, such as v1.2.0.
- From branch (`target`, text): The branch to tag when the tag is new. Leave empty for the default branch.
- Title (`name`, text): The release's title. Defaults to the tag.
- Release notes (`notes`, text): What is in it, in Markdown.
- Draft (`draft`, true/false): Save it as a draft rather than publishing it. Off by default. Default: `false`.
- Pre-release (`prerelease`, true/false): Mark it as a pre-release. Off by default. Default: `false`.

**Outputs**

- `assets` (list): Files attached to the release
- `author` (text): Who published it
- `body` (text): Its release notes, in Markdown
- `created_at` (text): When it was created (ISO 8601)
- `draft` (true/false): True while it is a draft
- `html_url` (text): Its page
- `id` (number): The release's ID
- `name` (text): Its title
- `prerelease` (true/false): True when it is a pre-release
- `published_at` (text): When it was published (ISO 8601)
- `tag_name` (text): Its tag, such as v1.2.0
- `target` (text): The branch or commit the tag was made from

**Example output**

```json
{
  "assets": [],
  "author": "sam",
  "body": "New pricing page.",
  "created_at": "2026-10-22T09:00:00Z",
  "draft": false,
  "html_url": "https://gitea.example.com/acme/website/releases/tag/v1.2.0",
  "id": 77,
  "name": "v1.2.0",
  "prerelease": false,
  "published_at": "2026-10-22T09:00:00Z",
  "tag_name": "v1.2.0",
  "target": "main"
}
```

### Create repository

Create a repository for you or one of your organizations, private and with a README by default.

**Inputs**

- Name (`name`, text, required): The repository's name: letters, digits, '-', '_' and '.'.
- Description (`description`, text): A short description.
- Private (`private`, true/false): Only members can see it. On by default. Default: `true`.
- Organization (`organization`, text): Create it in this organization. Leave empty for your own account.
- Add a README (`add_readme`, true/false): Start it with a README, so it has a default branch. On by default. Default: `true`.

**Outputs**

- `archived` (true/false): True when it is archived (read-only)
- `clone_url` (text): The address to clone it from
- `created_at` (text): When it was created (ISO 8601)
- `default_branch` (text): Its default branch, such as main
- `description` (text): Its description
- `fork` (true/false): True when it is a fork
- `forks` (number): How many forks it has
- `full_name` (text): owner/name
- `html_url` (text): Its page
- `name` (text): The repository's name
- `open_issues` (number): How many issues are open
- `open_pull_requests` (number): How many pull requests are open
- `owner` (text): The user or organization that owns it
- `private` (true/false): True when only members can see it
- `stars` (number): How many stars it has
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "archived": false,
  "clone_url": "https://gitea.example.com/acme/website.git",
  "created_at": "2026-01-05T10:00:00Z",
  "default_branch": "main",
  "description": "Our website",
  "fork": false,
  "forks": 1,
  "full_name": "acme/website",
  "html_url": "https://gitea.example.com/acme/website",
  "name": "website",
  "open_issues": 3,
  "open_pull_requests": 1,
  "owner": "acme",
  "private": false,
  "stars": 4,
  "updated_at": "2026-10-20T09:00:00Z"
}
```

### Delete branch

Delete a branch. Gitea refuses for a protected or default branch.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- Branch (`branch`, text, required): The branch to delete.

**Outputs**

- `branch` (text): The branch deleted
- `deleted` (true/false): True once deleted

**Example output**

```json
{
  "branch": "fix-link",
  "deleted": true
}
```

### Delete repository

Delete a repository for good, with its issues, pull requests and releases. It cannot be undone.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.

**Outputs**

- `deleted` (true/false): True once deleted
- `repository` (text): The repository deleted

**Example output**

```json
{
  "deleted": true,
  "repository": "acme/old-site"
}
```

### Get file

Read a file's text from a repository, on a branch or the default one.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- File path (`path`, text, required): The file's path in the repository, such as docs/README.md.
- Branch (`branch`, text): The branch to read from. Leave empty for the default branch.

**Outputs**

- `content` (text): Its text; empty when it is not text
- `download_url` (text): Its raw download address
- `html_url` (text): Its page
- `is_text` (true/false): True when the file is text
- `path` (text): The file's path
- `sha` (text): The file's SHA, which changes with every edit
- `size` (number): Its size in bytes

**Example output**

```json
{
  "content": "Hello there\n",
  "download_url": "https://gitea.example.com/acme/website/raw/branch/main/docs/README.md",
  "html_url": "https://gitea.example.com/acme/website/src/branch/main/docs/README.md",
  "is_text": true,
  "path": "docs/README.md",
  "sha": "e6f1b6c3d1bf880d606379609238c57fe60016db",
  "size": 12
}
```

### Get issue

Get one issue or pull request by its number.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- Issue number (`issue_number`, text, required): The issue's or pull request's number, such as 42.

**Outputs**

- `assignees` (list): Who it is assigned to
- `author` (text): Who opened it
- `body` (text): Its description, in Markdown
- `closed_at` (text): When it was closed (ISO 8601); empty when open
- `comments` (number): How many comments it has
- `created_at` (text): When it was opened (ISO 8601)
- `due_date` (text): When it is due (ISO 8601); empty when not set
- `html_url` (text): Its page
- `labels` (list): Its labels' names
- `milestone` (text): Its milestone's title; empty when none
- `number` (number): Its number in the repository
- `state` (text): open or closed
- `title` (text): Its title
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "assignees": [
    "sam"
  ],
  "author": "jo",
  "body": "The 'Contact sales' link goes nowhere.",
  "closed_at": "",
  "comments": 2,
  "created_at": "2026-10-20T09:00:00Z",
  "due_date": "2026-10-31T00:00:00Z",
  "html_url": "https://gitea.example.com/acme/website/issues/42",
  "labels": [
    "bug"
  ],
  "milestone": "October",
  "number": 42,
  "state": "open",
  "title": "Broken link on the pricing page",
  "updated_at": "2026-10-21T09:00:00Z"
}
```

### Get latest release

Get the newest published release that is not a draft or a pre-release.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.

**Outputs**

- `assets` (list): Files attached to the release
- `author` (text): Who published it
- `body` (text): Its release notes, in Markdown
- `created_at` (text): When it was created (ISO 8601)
- `draft` (true/false): True while it is a draft
- `html_url` (text): Its page
- `id` (number): The release's ID
- `name` (text): Its title
- `prerelease` (true/false): True when it is a pre-release
- `published_at` (text): When it was published (ISO 8601)
- `tag_name` (text): Its tag, such as v1.2.0
- `target` (text): The branch or commit the tag was made from

**Example output**

```json
{
  "assets": [],
  "author": "sam",
  "body": "New pricing page.",
  "created_at": "2026-10-22T09:00:00Z",
  "draft": false,
  "html_url": "https://gitea.example.com/acme/website/releases/tag/v1.2.0",
  "id": 77,
  "name": "v1.2.0",
  "prerelease": false,
  "published_at": "2026-10-22T09:00:00Z",
  "tag_name": "v1.2.0",
  "target": "main"
}
```

### Get pull request

Get one pull request: its branches, and whether it is merged or can be merged.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- Pull request number (`pull_number`, text, required): The pull request's number, such as 42.

**Outputs**

- `assignees` (list): Who it is assigned to
- `author` (text): Who opened it
- `base_branch` (text): The branch it merges into
- `body` (text): Its description, in Markdown
- `closed_at` (text): When it was closed (ISO 8601); empty when open
- `comments` (number): How many comments it has
- `created_at` (text): When it was opened (ISO 8601)
- `draft` (true/false): True while marked work in progress
- `due_date` (text): When it is due (ISO 8601); empty when not set
- `head_branch` (text): The branch with the changes
- `html_url` (text): Its page
- `labels` (list): Its labels' names
- `mergeable` (true/false): True when it can be merged without conflicts
- `merged` (true/false): True once merged
- `merged_at` (text): When it was merged (ISO 8601); empty when not
- `merged_by` (text): Who merged it
- `milestone` (text): Its milestone's title; empty when none
- `number` (number): Its number in the repository
- `state` (text): open or closed
- `title` (text): Its title
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "assignees": [
    "sam"
  ],
  "author": "jo",
  "base_branch": "main",
  "body": "The 'Contact sales' link goes nowhere.",
  "closed_at": "",
  "comments": 2,
  "created_at": "2026-10-20T09:00:00Z",
  "draft": false,
  "due_date": "2026-10-31T00:00:00Z",
  "head_branch": "fix-link",
  "html_url": "https://gitea.example.com/acme/website/pulls/43",
  "labels": [
    "bug"
  ],
  "mergeable": true,
  "merged": false,
  "merged_at": "",
  "merged_by": "",
  "milestone": "October",
  "number": 43,
  "state": "open",
  "title": "Fix the pricing link",
  "updated_at": "2026-10-21T09:00:00Z"
}
```

### Get repository

Get a repository's details: its default branch and counts of open issues and pull requests.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.

**Outputs**

- `archived` (true/false): True when it is archived (read-only)
- `clone_url` (text): The address to clone it from
- `created_at` (text): When it was created (ISO 8601)
- `default_branch` (text): Its default branch, such as main
- `description` (text): Its description
- `fork` (true/false): True when it is a fork
- `forks` (number): How many forks it has
- `full_name` (text): owner/name
- `html_url` (text): Its page
- `name` (text): The repository's name
- `open_issues` (number): How many issues are open
- `open_pull_requests` (number): How many pull requests are open
- `owner` (text): The user or organization that owns it
- `private` (true/false): True when only members can see it
- `stars` (number): How many stars it has
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "archived": false,
  "clone_url": "https://gitea.example.com/acme/website.git",
  "created_at": "2026-01-05T10:00:00Z",
  "default_branch": "main",
  "description": "Our website",
  "fork": false,
  "forks": 1,
  "full_name": "acme/website",
  "html_url": "https://gitea.example.com/acme/website",
  "name": "website",
  "open_issues": 3,
  "open_pull_requests": 1,
  "owner": "acme",
  "private": false,
  "stars": 4,
  "updated_at": "2026-10-20T09:00:00Z"
}
```

### List branches

List a repository's branches with each one's latest commit.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.

**Outputs**

- `branches` (list): The branches
- `count` (number): How many

**Example output**

```json
{
  "branches": [
    {
      "commit_message": "Fix the pricing link",
      "commit_sha": "4f2a9c1d8e7b6a5f4e3d2c1b0a9f8e7d6c5b4a39",
      "name": "fix-link",
      "protected": false
    }
  ],
  "count": 1
}
```

### List comments

List the comments on an issue or pull request, oldest first.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- Issue number (`issue_number`, text, required): The issue's or pull request's number, such as 42.

**Outputs**

- `comments` (list): The comments
- `count` (number): How many

**Example output**

```json
{
  "comments": [
    {
      "author": "sam",
      "body": "Fixed in #43.",
      "created_at": "2026-10-21T09:00:00Z",
      "html_url": "https://gitea.example.com/acme/website/issues/42#issuecomment-901",
      "id": 901,
      "updated_at": "2026-10-21T09:00:00Z"
    }
  ],
  "count": 1
}
```

### List issues

List a repository's issues, newest first, by state, labels, words or last change.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- State (`state`, text): Which issues. Defaults to open. One of: `open`, `closed`, `all` (Open and closed). Default: `open`.
- Labels (`labels`, list): Only issues with all of these labels.
- Search for (`search`, text): Only issues with these words.
- Changed since (`since`, date and time): Only issues changed after this moment.
- Page size (`limit`, number): How many to return, up to 50. Defaults to 30. From 1 to 50.
- Page (`page`, number): Which page, from 1. Use it when 'has_more' was true. At least 1.

**Outputs**

- `count` (number): How many were returned
- `has_more` (true/false): True when there may be another page
- `issues` (list): The issues
- `page` (number): The page returned

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "issues": [
    {
      "assignees": [
        "sam"
      ],
      "author": "jo",
      "body": "The 'Contact sales' link goes nowhere.",
      "closed_at": "",
      "comments": 2,
      "created_at": "2026-10-20T09:00:00Z",
      "due_date": "2026-10-31T00:00:00Z",
      "html_url": "https://gitea.example.com/acme/website/issues/42",
      "labels": [
        "bug"
      ],
      "milestone": "October",
      "number": 42,
      "state": "open",
      "title": "Broken link on the pricing page",
      "updated_at": "2026-10-21T09:00:00Z"
    }
  ],
  "page": 1
}
```

### List labels

List the labels a repository's issues and pull requests can carry.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.

**Outputs**

- `count` (number): How many
- `labels` (list): The labels

**Example output**

```json
{
  "count": 1,
  "labels": [
    {
      "color": "e11d21",
      "description": "Something is broken",
      "id": 5,
      "name": "bug"
    }
  ]
}
```

### List pull requests

List a repository's pull requests by state.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- State (`state`, text): Which pull requests. Defaults to open. One of: `open`, `closed`, `all` (Open and closed). Default: `open`.
- Order (`sort`, text): Defaults to recently updated first. One of: `recentupdate` (Recently updated first), `oldest` (Oldest first), `leastupdate` (Least recently updated first), `mostcomment` (Most commented first). Default: `recentupdate`.
- Page size (`limit`, number): How many to return, up to 50. Defaults to 30. From 1 to 50.
- Page (`page`, number): Which page, from 1. Use it when 'has_more' was true. At least 1.

**Outputs**

- `count` (number): How many were returned
- `has_more` (true/false): True when there may be another page
- `page` (number): The page returned
- `pull_requests` (list): The pull requests

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "page": 1,
  "pull_requests": [
    {
      "assignees": [
        "sam"
      ],
      "author": "jo",
      "base_branch": "main",
      "body": "The 'Contact sales' link goes nowhere.",
      "closed_at": "",
      "comments": 2,
      "created_at": "2026-10-20T09:00:00Z",
      "draft": false,
      "due_date": "2026-10-31T00:00:00Z",
      "head_branch": "fix-link",
      "html_url": "https://gitea.example.com/acme/website/pulls/43",
      "labels": [
        "bug"
      ],
      "mergeable": true,
      "merged": false,
      "merged_at": "",
      "merged_by": "",
      "milestone": "October",
      "number": 43,
      "state": "open",
      "title": "Fix the pricing link",
      "updated_at": "2026-10-21T09:00:00Z"
    }
  ]
}
```

### List releases

List a repository's releases, newest first.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- Page size (`limit`, number): How many to return, up to 50. Defaults to 30. From 1 to 50.
- Page (`page`, number): Which page, from 1. Use it when 'has_more' was true. At least 1.

**Outputs**

- `count` (number): How many were returned
- `has_more` (true/false): True when there may be another page
- `page` (number): The page returned
- `releases` (list): The releases

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "page": 1,
  "releases": [
    {
      "assets": [],
      "author": "sam",
      "body": "New pricing page.",
      "created_at": "2026-10-22T09:00:00Z",
      "draft": false,
      "html_url": "https://gitea.example.com/acme/website/releases/tag/v1.2.0",
      "id": 77,
      "name": "v1.2.0",
      "prerelease": false,
      "published_at": "2026-10-22T09:00:00Z",
      "tag_name": "v1.2.0",
      "target": "main"
    }
  ]
}
```

### List repositories

List your repositories, or search every repository you can see by words in its name or description.

**Inputs**

- Search for (`search`, text): Words to search for. Leave empty to list your own repositories (needs a token).
- Page size (`limit`, number): How many to return, up to 50. Defaults to 30. From 1 to 50.
- Page (`page`, number): Which page, from 1. Use it when 'has_more' was true. At least 1.

**Outputs**

- `count` (number): How many were returned
- `has_more` (true/false): True when there may be another page
- `page` (number): The page returned
- `repositories` (list): The repositories

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "page": 1,
  "repositories": [
    {
      "archived": false,
      "clone_url": "https://gitea.example.com/acme/website.git",
      "created_at": "2026-01-05T10:00:00Z",
      "default_branch": "main",
      "description": "Our website",
      "fork": false,
      "forks": 1,
      "full_name": "acme/website",
      "html_url": "https://gitea.example.com/acme/website",
      "name": "website",
      "open_issues": 3,
      "open_pull_requests": 1,
      "owner": "acme",
      "private": false,
      "stars": 4,
      "updated_at": "2026-10-20T09:00:00Z"
    }
  ]
}
```

### Merge pull request

Merge a pull request, by a merge commit, a squash, a rebase or a fast-forward.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- Pull request number (`pull_number`, text, required): The pull request's number, such as 42.
- How (`method`, text): How to merge. Defaults to a merge commit. One of: `merge` (Create a merge commit), `squash` (Squash and merge), `rebase` (Rebase and merge), `rebase-merge` (Rebase, then create a merge commit), `fast-forward-only` (Fast-forward only). Default: `merge`.
- Commit message (`message`, text): The merge or squash commit's message. Leave empty for Gitea's own.
- Delete the branch (`delete_branch_after`, true/false): Delete the merged branch afterwards. Off by default. Default: `false`.

**Outputs**

- `assignees` (list): Who it is assigned to
- `author` (text): Who opened it
- `base_branch` (text): The branch it merges into
- `body` (text): Its description, in Markdown
- `closed_at` (text): When it was closed (ISO 8601); empty when open
- `comments` (number): How many comments it has
- `created_at` (text): When it was opened (ISO 8601)
- `draft` (true/false): True while marked work in progress
- `due_date` (text): When it is due (ISO 8601); empty when not set
- `head_branch` (text): The branch with the changes
- `html_url` (text): Its page
- `labels` (list): Its labels' names
- `mergeable` (true/false): True when it can be merged without conflicts
- `merged` (true/false): True once merged
- `merged_at` (text): When it was merged (ISO 8601); empty when not
- `merged_by` (text): Who merged it
- `milestone` (text): Its milestone's title; empty when none
- `number` (number): Its number in the repository
- `state` (text): open or closed
- `title` (text): Its title
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "assignees": [
    "sam"
  ],
  "author": "jo",
  "base_branch": "main",
  "body": "The 'Contact sales' link goes nowhere.",
  "closed_at": "",
  "comments": 2,
  "created_at": "2026-10-20T09:00:00Z",
  "draft": false,
  "due_date": "2026-10-31T00:00:00Z",
  "head_branch": "fix-link",
  "html_url": "https://gitea.example.com/acme/website/pulls/43",
  "labels": [
    "bug"
  ],
  "mergeable": true,
  "merged": true,
  "merged_at": "2026-10-22T09:00:00Z",
  "merged_by": "sam",
  "milestone": "October",
  "number": 43,
  "state": "closed",
  "title": "Fix the pricing link",
  "updated_at": "2026-10-21T09:00:00Z"
}
```

### Save file

Create a file, or replace its text, as one commit on a branch or the default one.

**Inputs**

- Repository (`repository`, text, required): The repository, as owner/name. Pick one, type it, or paste its address.
- File path (`path`, text, required): The file's path in the repository, such as docs/changes.md.
- Text (`content`, text, required): The file's whole new text.
- Commit message (`message`, text): What changed. Defaults to 'Update' and the file's path.
- Branch (`branch`, text): The branch to commit to. Leave empty for the default branch.

**Outputs**

- `commit_sha` (text): The commit made
- `content` (text): Its text; empty when it is not text
- `created` (true/false): True when the file was new
- `download_url` (text): Its raw download address
- `html_url` (text): Its page
- `path` (text): The file's path
- `sha` (text): The file's SHA, which changes with every edit
- `size` (number): Its size in bytes

**Example output**

```json
{
  "commit_sha": "9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c",
  "content": "Hello there\n",
  "created": false,
  "download_url": "https://gitea.example.com/acme/website/raw/branch/main/docs/README.md",
  "html_url": "https://gitea.example.com/acme/website/src/branch/main/docs/README.md",
  "path": "docs/README.md",
  "sha": "e6f1b6c3d1bf880d606379609238c57fe60016db",
  "size": 12
}
```
