Move releases, self-update and links to ELY-Open-Source on GitHub
- kigi-env: update_base_url defaults to api.github.com/repos/ELY-Open-Source/Kigi-CLI/releases. - install.sh / install.ps1: resolve releases from the same API. - /feedback and the no-session feedback fallback open GitHub issues/new; /docs opens the README on GitHub. - SECURITY, NOTICE, AGENTS, CONTRIBUTING: GitHub repo, issues and fork-based pull requests replace git.zacharyzhang.com and AGit. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
14 files changed
+28
-35
No files matched your search
@@ -21,7 +21,7 @@ pub struct KigiEndpoints {
|
||||
pub const PRODUCTION_ENDPOINTS: KigiEndpoints = KigiEndpoints {
|
||||
coding_api_base_url: "https://api.kimi.com/coding/v1",
|
||||
oauth_host: "https://auth.kimi.com",
|
||||
update_base_url: "https://git.zacharyzhang.com/api/v1/repos/ZacharyZhang-NY/Kigi-CLI/releases",
|
||||
update_base_url: "https://api.github.com/repos/ELY-Open-Source/Kigi-CLI/releases",
|
||||
upgrade_page_url: "https://www.kimi.com/code/",
|
||||
};
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ use std::sync::Arc;
|
||||
use serde::Serialize;
|
||||
|
||||
/// Where non-subscription users (no OAuth session) submit feedback instead.
|
||||
pub const FEEDBACK_ISSUES_URL: &str = "https://git.zacharyzhang.com/ZacharyZhang-NY/Kigi-CLI/issues";
|
||||
pub const FEEDBACK_ISSUES_URL: &str = "https://github.com/ELY-Open-Source/Kigi-CLI/issues/new";
|
||||
|
||||
/// HTTP error from the feedback endpoint with a preserved status code, so
|
||||
/// callers can distinguish auth failures (401) without string matching.
|
||||
|
||||
@@ -10,7 +10,7 @@ use crate::slash::command::{AppCtx, ArgItem, CommandExecCtx, CommandResult, Slas
|
||||
|
||||
/// Online docs landing page (hardcoded like other TUI deep-links; the
|
||||
/// project README is the docs entry point for the repo-hosted docs).
|
||||
pub const BUILD_DOCS_URL: &str = "https://git.zacharyzhang.com/ZacharyZhang-NY/Kigi-CLI/src/branch/main/README.md";
|
||||
pub const BUILD_DOCS_URL: &str = "https://github.com/ELY-Open-Source/Kigi-CLI/blob/main/README.md";
|
||||
|
||||
/// Open How-to Guides or online Build docs.
|
||||
pub struct DocsCommand;
|
||||
|
||||
@@ -6,7 +6,7 @@ use crate::slash::command::{CommandExecCtx, CommandResult, SlashCommand};
|
||||
/// Where feedback goes: the project's own issue tracker. Kigi is a community
|
||||
/// build, so its feedback belongs on its own repo — mirroring the official
|
||||
/// kimi-cli, whose `/feedback` opens its repo's issues page.
|
||||
pub const FEEDBACK_ISSUES_URL: &str = "https://git.zacharyzhang.com/ZacharyZhang-NY/Kigi-CLI/issues";
|
||||
pub const FEEDBACK_ISSUES_URL: &str = "https://github.com/ELY-Open-Source/Kigi-CLI/issues/new";
|
||||
|
||||
/// Open the Kigi issue tracker in the browser.
|
||||
pub struct FeedbackCommand;
|
||||
|
||||
@@ -695,7 +695,7 @@ pub(crate) fn detect_platform() -> Result<(&'static str, &'static str)> {
|
||||
|
||||
/// Rust target triple for this build — the key that maps a platform to its
|
||||
/// release-asset name. Must stay in lockstep with the five targets built by
|
||||
/// `.gitea/workflows/release.yml` and the tables in install.sh/install.ps1.
|
||||
/// `.github/workflows/release.yml` and the tables in install.sh/install.ps1.
|
||||
pub(crate) fn target_triple() -> Result<&'static str> {
|
||||
let triple = if cfg!(all(target_os = "macos", target_arch = "aarch64")) {
|
||||
"aarch64-apple-darwin"
|
||||
@@ -2653,7 +2653,7 @@ mod tests {
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
|
||||
#[test]
|
||||
fn test_release_asset_name_matches_release_workflow_naming() {
|
||||
// Must stay in lockstep with .gitea/workflows/release.yml, which
|
||||
// Must stay in lockstep with .github/workflows/release.yml, which
|
||||
// publishes kigi-<version>-<target-triple>.{tar.gz|zip}.
|
||||
let triple = target_triple().unwrap();
|
||||
assert!(
|
||||
|
||||
@@ -10,7 +10,7 @@ const TTL_SECONDS_BEFORE_AUTO_UPDATE: Duration = Duration::from_secs(60 * 30);
|
||||
|
||||
/// Release channel: this repo's Releases (PRD F8). The API base is resolved
|
||||
/// through [`kigi_env::update_base_url`] — production default
|
||||
/// `https://git.zacharyzhang.com/api/v1/repos/ZacharyZhang-NY/Kigi-CLI/releases`,
|
||||
/// `https://api.github.com/repos/ELY-Open-Source/Kigi-CLI/releases`,
|
||||
/// overridable via `KIGI_UPDATE_BASE_URL` for mirrors and tests.
|
||||
pub(crate) fn update_base_url() -> String {
|
||||
kigi_env::update_base_url()
|
||||
@@ -533,7 +533,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_release_json_parses_github_wire_shape() {
|
||||
let json = r#"{
|
||||
"url": "https://git.zacharyzhang.com/api/v1/repos/ZacharyZhang-NY/Kigi-CLI/releases/1",
|
||||
"url": "https://api.github.com/repos/ELY-Open-Source/Kigi-CLI/releases/1",
|
||||
"tag_name": "v0.1.0",
|
||||
"name": "Kigi 0.1.0",
|
||||
"draft": false,
|
||||
@@ -541,13 +541,13 @@ mod tests {
|
||||
"assets": [
|
||||
{
|
||||
"name": "kigi-0.1.0-aarch64-apple-darwin.tar.gz",
|
||||
"browser_download_url": "https://git.zacharyzhang.com/ZacharyZhang-NY/Kigi-CLI/releases/download/v0.1.0/kigi-0.1.0-aarch64-apple-darwin.tar.gz",
|
||||
"browser_download_url": "https://github.com/ELY-Open-Source/Kigi-CLI/releases/download/v0.1.0/kigi-0.1.0-aarch64-apple-darwin.tar.gz",
|
||||
"size": 123,
|
||||
"content_type": "application/gzip"
|
||||
},
|
||||
{
|
||||
"name": "SHA256SUMS",
|
||||
"browser_download_url": "https://git.zacharyzhang.com/ZacharyZhang-NY/Kigi-CLI/releases/download/v0.1.0/SHA256SUMS"
|
||||
"browser_download_url": "https://github.com/ELY-Open-Source/Kigi-CLI/releases/download/v0.1.0/SHA256SUMS"
|
||||
}
|
||||
]
|
||||
}"#;
|
||||
@@ -560,7 +560,7 @@ mod tests {
|
||||
let asset = r.asset("kigi-0.1.0-aarch64-apple-darwin.tar.gz").unwrap();
|
||||
assert_eq!(
|
||||
asset.browser_download_url,
|
||||
"https://git.zacharyzhang.com/ZacharyZhang-NY/Kigi-CLI/releases/download/v0.1.0/kigi-0.1.0-aarch64-apple-darwin.tar.gz"
|
||||
"https://github.com/ELY-Open-Source/Kigi-CLI/releases/download/v0.1.0/kigi-0.1.0-aarch64-apple-darwin.tar.gz"
|
||||
);
|
||||
assert_eq!(
|
||||
r.asset("SHA256SUMS").unwrap().name,
|
||||
|
||||
@@ -114,7 +114,7 @@ pub fn host_platform() -> String {
|
||||
}
|
||||
|
||||
/// Host Rust target triple, matching `auto_update::target_triple()` and the
|
||||
/// release-asset naming in `.gitea/workflows/release.yml`.
|
||||
/// release-asset naming in `.github/workflows/release.yml`.
|
||||
pub fn host_triple() -> &'static str {
|
||||
if cfg!(all(target_os = "macos", target_arch = "aarch64")) {
|
||||
"aarch64-apple-darwin"
|
||||
|
||||
Reference in new issue
Block a user