clients.gitea #
https://try.gitea.io/swagger.v1.json
to see what can be done
https://try.gitea.io/api/swagger#/
tip
use openai to convert example return to v struct, ask Kristof for more info.
projects not there yet,
https://github.com/go-gitea/gitea/pull/28111 but looks like will be soon
fn delete #
fn delete(instance string) !
fn get #
fn get(instance string) !GiteaClient[Config]
get instance of our client params
fn heroplay #
fn heroplay(mut plbook playbook.PlayBook) !
fn new #
fn new(instance string, cfg Config) !GiteaClient[Config]
fn (GiteaClient[Config]) orgs #
fn (mut client GiteaClient[Config]) orgs() ![]Organization
Get repositories from Gitea
fn (GiteaClient[Config]) search_repos #
fn (mut client GiteaClient[Config]) search_repos() ![]Repo
Get repositories from Gitea
fn (GiteaClient[T]) get_issues #
fn (mut client GiteaClient[T]) get_issues(owner string, repo string) ![]Issue
Get repositories from Gitea
fn (GiteaClient[T]) organization_repos #
fn (mut client GiteaClient[T]) organization_repos(name string, options OrgReposOptions) ![]Repo
Get repositories from Gitea
fn (GiteaClient[T]) search_users #
fn (mut client GiteaClient[T]) search_users(options SearchOptions) ![]User
Get repositories from Gitea
fn (GiteaClient[T]) user_repos #
fn (mut client GiteaClient[T]) user_repos(username string, options UserReposOptions) ![]Repo
Get repositories from Gitea
struct Config #
struct Config {
pub mut:
url string
username string
password string @[secret]
}
struct Issue #
struct Issue {
pub mut:
id int
url string
html_url string @[json: 'html_url']
number int
user User
original_author string @[json: 'original_author']
original_author_id int @[json: 'original_author_id']
title string
body string
ref string
assets []string // Assuming assets is an array of strings; adjust based on actual data structure
labels []string // Assuming labels is an array of strings; adjust based on actual data structure
milestone ?string // Use option type if the field can be null
assignee ?User // Use option type if the field can be null, adjust based on actual data structure
assignees ?[]User // Use option type if the field can be null, adjust based on actual data structure
state string
is_locked bool @[json: 'is_locked']
comments int
created_at string @[json: 'created_at']
updated_at string @[json: 'updated_at']
closed_at ?string // Use option type if the field can be null
due_date ?string // Use option type if the field can be null
pull_request ?string // Use option type if the field can be null, adjust based on actual data structure
repository Repository
pin_order int @[json: 'pin_order']
}
struct OrgReposOptions #
@[params]
struct OrgReposOptions {
page int // page number of results to return (1-based)
limit int // page size of results
}
struct Organization #
struct Organization {
pub:
avatar_url string
description string
email string
full_name string
id int
location string
name string
repo_admin_change_team_access bool
username string
visibility string
website string
}
struct RAsset #
struct RAsset {
pub mut:
browser_download_url string
created_at string
download_count int
id int
name string
size int
uuid string
}
struct RExternalTracker #
struct RExternalTracker {
pub mut:
external_tracker_format string
external_tracker_regexp_pattern string
external_tracker_style string
external_tracker_url string
}
struct RExternalWiki #
struct RExternalWiki {
pub mut:
external_wiki_url string
}
struct RInternalTracker #
struct RInternalTracker {
pub mut:
allow_only_contributors_to_track_time bool
enable_issue_dependencies bool
enable_time_tracker bool
}
struct RIssue #
struct RIssue {
pub mut:
assets []RAsset
assignee RUser
assignees []RUser
body string
closed_at string
comments int
created_at string
due_date string
html_url string
id int
is_locked bool
labels []RLabel
milestone RMilestone
number int
original_author string
original_author_id int
pin_order int
pull_request RPullRequest
ref string
repository RRepositoryInfo
state string
title string
updated_at string
url string
user RUser
}
struct RLabel #
struct RLabel {
pub mut:
color string
description string
exclusive bool
id int
is_archived bool
name string
url string
}
struct RMilestone #
struct RMilestone {
pub mut:
closed_at string
closed_issues int
created_at string
description string
due_on string
id int
open_issues int
state string
title string
updated_at string
}
struct ROrganization #
struct ROrganization {
pub mut:
avatar_url string
description string
email string
full_name string
id int
location string
name string
repo_admin_change_team_access bool
username string
visibility string
website string
}
struct ROwner #
struct ROwner {
pub mut:
active bool
avatar_url string
created string
description string
email string
followers_count int
following_count int
full_name string
id int
is_admin bool
language string
last_login string
location string
login string
login_name string
prohibit_login bool
restricted bool
starred_repos_count int
visibility string
website string
}
struct RPermissions #
struct RPermissions {
pub mut:
admin bool
pull bool
push bool
}
struct RPullRequest #
struct RPullRequest {
pub mut:
merged bool
merged_at string
}
struct RRepository #
struct RRepository {
pub mut:
allow_merge_commits bool
allow_rebase bool
allow_rebase_explicit bool
allow_rebase_update bool
allow_squash_merge bool
archived bool
archived_at string
avatar_url string
clone_url string
created_at string
default_allow_maintainer_edit bool
default_branch string
default_delete_branch_after_merge bool
default_merge_style string
description string
empty bool
// external_tracker RExternalTracker
// external_wiki RExternalWiki
fork bool
forks_count int
full_name string
has_actions bool
has_issues bool
has_packages bool
has_projects bool
has_pull_requests bool
has_releases bool
has_wiki bool
html_url string
id int
ignore_whitespace_conflicts bool
internal bool
// internal_tracker RInternalTracker
language string
languages_url string
link string
mirror bool
mirror_interval string
mirror_updated string
name string
open_issues_count int
open_pr_counter int
original_url string
owner ROwner
parent string
// permissions RPermissions
private bool
release_counter int
// repo_transfer RRepoTransfer
size int
ssh_url string
stars_count int
template bool
updated_at string
url string
watchers_count int
website string
}
struct RRepositoryInfo #
struct RRepositoryInfo {
pub mut:
full_name string
id int
name string
owner string
}
struct RTeam #
struct RTeam {
pub mut:
can_create_org_repo bool
description string
id int
includes_all_repositories bool
name string
organization ROrganization
permission string
units []string
units_map map[string]string
}
struct RUser #
struct RUser {
pub mut:
active bool
avatar_url string
created string
description string
email string
followers_count int
following_count int
full_name string
id int
is_admin bool
language string
last_login string
location string
login string
login_name string
prohibit_login bool
restricted bool
starred_repos_count int
visibility string
website string
}
pub struct RRepoTransfer { pub mut: doer RUser recipient RUser teams []Team }
struct Repository #
struct Repository {
pub mut:
id int
name string
owner string
full_name string @[json: 'full_name']
}
struct SearchOptions #
@[params]
struct SearchOptions {
q string // keyword
uid i64 // ID of the user to search for
page int // page number of results to return (1-based)
limit int // page size of results
}
struct SearchUsersResponse #
struct SearchUsersResponse {
data []User
ok bool
}
struct User #
struct User {
pub mut:
id int
login string
login_name string @[json: 'login_name']
full_name string @[json: 'full_name']
email string
avatar_url string @[json: 'avatar_url']
language string
is_admin bool @[json: 'is_admin']
last_login string @[json: 'last_login']
created string
restricted bool
active bool
prohibit_login bool @[json: 'prohibit_login']
location string
website string
description string
visibility string
followers_count int @[json: 'followers_count']
following_count int @[json: 'following_count']
starred_repos_count int @[json: 'starred_repos_count']
username string
}
struct UserReposOptions #
@[params]
struct UserReposOptions {
page int // page number of results to return (1-based)
limit int // page size of results
}
- README
- fn delete
- fn get
- fn heroplay
- fn new
- type GiteaClient[Config]
- type GiteaClient[T]
- struct Config
- struct Issue
- struct OrgReposOptions
- struct Organization
- struct RAsset
- struct RExternalTracker
- struct RExternalWiki
- struct RInternalTracker
- struct RIssue
- struct RLabel
- struct RMilestone
- struct ROrganization
- struct ROwner
- struct RPermissions
- struct RPullRequest
- struct RRepository
- struct RRepositoryInfo
- struct RTeam
- struct RUser
- struct Repository
- struct SearchOptions
- struct SearchUsersResponse
- struct User
- struct UserReposOptions