feat: add scripts to manage git repos
Node.js CI / Lint and Test (push) Failing after 23s

This commit is contained in:
2025-12-11 17:40:44 -08:00
parent dd294879b9
commit 275fa2e579
5 changed files with 447 additions and 2 deletions
+216
View File
@@ -0,0 +1,216 @@
/**
* @copyright NHCarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
/* eslint-disable @typescript-eslint/naming-convention -- This is a Gitea interface. The responses from the API are not something we can control. */
interface Repository extends Record<string, unknown> {
allow_fast_forward_only_merge: boolean;
allow_merge_commits: boolean;
allow_rebase: boolean;
allow_rebase_explicit: boolean;
allow_rebase_update: boolean;
allow_squash_merge: boolean;
archived: boolean;
archived_at: string;
avatar_url: string;
clone_url: string;
created_at: string;
default_allow_maintainer_edit: boolean;
default_branch: string;
default_delete_branch_after_merge: boolean;
default_merge_style: string;
description: string;
empty: boolean;
external_tracker: {
external_tracker_format: string;
external_tracker_regexp_pattern: string;
external_tracker_style: string;
external_tracker_url: string;
};
external_wiki: {
external_wiki_url: string;
};
fork: boolean;
forks_count: number;
full_name: string;
has_actions: boolean;
has_issues: boolean;
has_packages: boolean;
has_projects: boolean;
has_pull_requests: boolean;
has_releases: boolean;
has_wiki: boolean;
html_url: string;
id: number;
ignore_whitespace_conflicts: boolean;
internal: boolean;
internal_tracker: {
allow_only_contributors_to_track_time: boolean;
enable_issue_dependencies: boolean;
enable_time_tracker: boolean;
};
language: string;
languages_url: string;
licenses: Array<string>;
link: string;
mirror: boolean;
mirror_interval: string;
mirror_updated: string;
name: string;
object_format_name: string;
open_issues_count: number;
open_pr_counter: number;
original_url: string;
owner: {
active: boolean;
avatar_url: string;
created: string;
description: string;
email: string;
followers_count: number;
following_count: number;
full_name: string;
html_url: string;
id: number;
is_admin: boolean;
language: string;
last_login: string;
location: string;
login: string;
login_name: string;
prohibit_login: boolean;
restricted: boolean;
source_id: number;
starred_repos_count: number;
visibility: string;
website: string;
};
parent: string;
permissions: {
admin: boolean;
pull: boolean;
push: boolean;
};
private: boolean;
projects_mode: string;
release_counter: number;
repo_transfer: {
doer: {
active: boolean;
avatar_url: string;
created: string;
description: string;
email: string;
followers_count: number;
following_count: number;
full_name: string;
html_url: string;
id: number;
is_admin: boolean;
language: string;
last_login: string;
location: string;
login: string;
login_name: string;
prohibit_login: boolean;
restricted: boolean;
source_id: number;
starred_repos_count: number;
visibility: string;
website: string;
};
recipient: {
active: boolean;
avatar_url: string;
created: string;
description: string;
email: string;
followers_count: number;
following_count: number;
full_name: string;
html_url: string;
id: number;
is_admin: boolean;
language: string;
last_login: string;
location: string;
login: string;
login_name: string;
prohibit_login: boolean;
restricted: boolean;
source_id: number;
starred_repos_count: number;
visibility: string;
website: string;
};
teams: Array<{
can_create_org_repo: boolean;
description: string;
id: number;
includes_all_repositories: boolean;
name: string;
organization: {
avatar_url: string;
description: string;
email: string;
full_name: string;
id: number;
location: string;
name: string;
repo_admin_change_team_access: boolean;
username: string;
visibility: string;
website: string;
};
permission: string;
units: Array<string>;
units_map: {
"repo.code": string;
"repo.ext_issues": string;
"repo.ext_wiki": string;
"repo.issues": string;
"repo.projects": string;
"repo.pulls": string;
"repo.releases": string;
"repo.wiki": string;
};
}>;
};
size: number;
ssh_url: string;
stars_count: number;
template: boolean;
topics: Array<string>;
updated_at: string;
url: string;
watchers_count: number;
website: string;
}
interface File {
_links: {
git: string;
html: string;
self: string;
};
content: string;
download_url: string;
encoding: string;
git_url: string;
html_url: string;
last_author_date: string;
last_commit_sha: string;
last_committer_date: string;
name: string;
path: string;
sha: string;
size: number;
submodule_git_url: string;
target: string;
type: string;
url: string;
}
export type { Repository, File };