No description
  • Python 84.7%
  • Roff 12.7%
  • Shell 2.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-18 18:38:45 +01:00
tests Initial release 2026-11-18 18:38:45 +01:00
.gitignore Initial release 2026-11-18 18:38:45 +01:00
fji Initial release 2026-11-18 18:38:45 +01:00
fji.1 Initial release 2026-11-18 18:38:45 +01:00
LICENSE Initialize repository 2026-11-18 17:34:05 +01:00
PKGBUILD Initial release 2026-11-18 18:38:45 +01:00
pyproject.toml Initial release 2026-11-18 18:38:45 +01:00
README.md Initial release 2026-11-18 18:38:45 +01:00

fji

Small Forgejo issue helper (Python 3 and requests).

Configuration

Create ~/.config/forgejo-issues/config.json (or use $XDG_CONFIG_HOME):

{
  "url": "https://code.example.com",
  "token": "YOUR_API_TOKEN",
  "exclude_owners": ["ak"],
  "exclude_repositories": []
}

Protect the token with chmod 600 ~/.config/forgejo-issues/config.json. The token needs repository read and issue read/write permissions. Excluded owners/repositories are ignored by all commands.

Usage

fji list                        # open issue references and titles
fji export -o issues.json       # all open issues, with dependencies
fji show 'infra/docs#12' -o issue.json  # one issue, with comments
fji import plan.json            # preview, then prompt for confirmation
fji update 12 issue.json        # diff, then prompt for confirmation

In a terminal supporting OSC 8 hyperlinks, list makes the issue references clickable without displaying long URLs. Piped output remains plain text.

export and show include read-only metadata such as state, labels, milestone, assignees, dependencies and timestamps. show also includes comments. update accepts their JSON output directly, but only changes title and body. Metadata, labels, dependencies, comments and state are ignored. When a snapshot includes number, it must match the command-line issue number. import accepts only repository, title, body and optional labels in each issue.

Example import file:

{
  "version": 1,
  "issues": [
    {
      "repository": "infra/docs",
      "title": "Example task",
      "body": "## Goal\nDescribe the task.",
      "labels": []
    }
  ]
}

Import resolves and validates all label names before creating any issues. All writes require explicit interactive y confirmation; Enter and non-interactive execution do not apply changes. A server failure during multi-issue import can still result in partial creation.

For full command usage and configuration details, see man fji after installing the Arch package.

Installation and tests

Install on Arch Linux using makepkg -si. The PKGBUILD depends on python and python-requests and installs the single executable at /usr/bin/fji. For development, install requests and pytest and run python -m pytest. The pyproject.toml also allows installation with pip where appropriate.