Replace GitLab integration with Gitea in issue reporting
Migrated issue reporting functionality from GitLab to Gitea. Updated environment variables, dependencies, and configuration references to support Gitea. Introduced `GiteaClient` for communication with the Gitea API and refactored related code and tests to align with the new integration.
This commit is contained in:
1 parent
a23e3843ed
commit
abdd2d1656
11 files changed
+194
-89
No files matched your search
+4
-5
@@ -1,4 +1,4 @@
|
||||
# Tasks
|
||||
# Tasks
|
||||
|
||||
**Packages:** `me.bobert.netneutrality.framework.task` (framework),
|
||||
`me.bobert.netneutrality.feature.*.task` (concrete tasks)
|
||||
@@ -249,7 +249,7 @@ Tasks can opt into extra behavior by implementing marker/behavior interfaces in
|
||||
| `EmojiReactionRoleTask` | `emoji` | `EmojiTask` (persistable) | Assign/remove a role when a user reacts with a mapped emoji. |
|
||||
| `AcceptButton` | `generic` | `ButtonTask` | Generic "accept" button running a supplied function. |
|
||||
| `CancelButton` | `generic` | `ButtonTask` | Generic "cancel" button running a supplied function. |
|
||||
| `ReportIssueTask` | `git` | `ModalTask` | Modal to report a bug; creates a GitLab issue. |
|
||||
| `ReportIssueTask` | `git` | `ModalTask` | Modal to report a bug; creates a Gitea issue. |
|
||||
| `BotInfo` | `help` | `AbstractBuiltInTask` | Show bot info + invite link. |
|
||||
| `CommandHelp` | `help` | `AbstractBuiltInTask` | Show command help + the bot prefix. |
|
||||
| `ReportBug` | `help` | `AbstractBuiltInTask` | Start a bug-report flow / provide the report link. |
|
||||
@@ -275,12 +275,11 @@ Tasks can opt into extra behavior by implementing marker/behavior interfaces in
|
||||
on the next startup via the
|
||||
[`PersistableTaskRegistry`](#persistabletaskregistry--discovery-and-restore).
|
||||
|
||||
### Worked example — GitLab bug report (modal)
|
||||
### Worked example — Gitea bug report (modal)
|
||||
|
||||
1. `ReportIssueTask.replyToInteraction` opens a modal with **title** and **description** fields.
|
||||
2. On submit, `ModalTaskContext` routes back to the task; `execute` reads the field values.
|
||||
3. The task connects to GitLab (using `GITLAB_HOST` / `GITLAB_TOKEN` / `GITLAB_PROJECT_ID` from
|
||||
configuration) and creates an issue, then returns `Lifecycle.REMOVE_SELF`.
|
||||
3. The task calls the Gitea API via `GiteaClient` (using `GITEA_HOST` / `GITEA_TOKEN` /`r`n `GITEA_OWNER` / `GITEA_REPO` from configuration) and creates an issue, then returns `Lifecycle.REMOVE_SELF`.
|
||||
|
||||
### Worked example — music results (parent/children)
|
||||
|
||||
|
||||
Reference in new issue
Block a user