aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/github
AgeCommit message (Collapse)Author
2023-05-10refactor: Move code from `lib.rs` into `main.rs` (#330)GeckoEidechse
Move remaining logic in one big move
2023-05-10refactor: Import constants from crate rootGeckoEidechse
Instead of lib
2023-05-09Revert "refactor: Move `check_is_valid_game_path` to `main.rs` (#335)"GeckoEidechse
This reverts commit 1ce900ca2d5cf91ae410c2ec918e1431aa15a677.
2023-05-09refactor: Move `check_is_valid_game_path` to `main.rs` (#335)GeckoEidechse
Part of #329
2023-05-09feat: Add category in changelog for i18n (#324)GeckoEidechse
2023-05-08refactor: Only pass commit sha for installing launcher CI build (#313)GeckoEidechse
* refactor: Only pass commit sha for installing launcher CI build This allows for easier usage later when installing a launcher build based on commit sha only, e.g. for installing newest build of a branch. * docs: Update comments to match current code
2023-05-08feat: Generate Northstar release notes (#277)GeckoEidechse
* feat: Allow selecting project to generate release notes for * fix: Add missing TypeScript bindings * feat: Pass project to backend on tag compare * fix: Check for unsupported project * feat: Allow fetching tags from Northstar repo * fix: Formatting and fixing typo * feat: Copy over Northstar release note generation from previous PR * refactor: Use Tag struct instead of string Allows for extendability in the future * fix: Use proper user-agent for web request * fix: Remove debug log prints * refactor: Use separete function for FlightCore release note generation One function for each FlightCore and Northstar * feat: Make CommitAuthor optional to deal with rebase commits that don't have a PR linked * fix: Address clippy issues * fix: Remove debug prints * docs: Add comments * refactor: Move import to top of source file
2023-05-06fix: Fix typoGeckoEidechse
2023-04-30fix: Fetch multiple pages from GitHub PR API (#298)GeckoEidechse
* fix: Fetch multiple pages from GitHub PR API Previously we only fetched the first page which caused us to miss older pull requests. * feat: Only check as many pages as we need Instead of checking a static x amount of pages in the API we only wanna fetch as many pages as we actually need.
2023-04-16Use pass-by-reference where possible (#266)cat_or_not
Use pass-by-reference where possible also contains some other small changes
2023-04-07fix: Change enum value casing (#255)GeckoEidechse
* fix: Chanege enum value casing as suggested by clippy * fix: Fix forgotten case change
2023-04-02fix: Another set of various clippy fixes (#246)GeckoEidechse
* fix: Remove unnecessary clone * fix: Remove redundant field name in struct init * fix: Single-char string constant used as pattern * fix: calling `push_str()` using a single-character string literal * fix: this pattern reimplements `Option::unwrap_or` * fix: Remove unnecessary borrow * fix: Remove useless use of `format!` * fix: called `inspect(..).for_each(..)` on an `Iterator` * fix: Formatting
2023-03-27fix: Various clippy fixes (#243)GeckoEidechse
* fix: Remove redundant return * fix: Remove unnecessary borrow * fix: Remove unnecessary import * fix: Use char for single character replacement instead of string * fix: Iterate over values directly instead of key-value pair * fix: Remove unnecessary let binding * fix: Remove unnecessary return statement * fix: Use char for single character replacement instead of string * refactor: Use struct short hand initialization
2023-03-27feat: Generate FlightCore release notes (#188)GeckoEidechse
* feat: Generate FlightCore release notes * fix: Remove leftover comment * fix: Add missing semantic commit type * fix: Re-add newlines accidentally removed in merge * refactor: Remove contributors section Will re-add a proper implementation in a later PR. * fix: Revert accidentally modified line * docs: Update comments * fix: Use correct user-agent * fix: Put unknown commits into "Other" section Previously they were just dropped * refactor: Move constant string array to right file * fix: Remove debug prints * refactor: Move lib import to start of file * refactor: Use wrapper type kinda needed by selector in frontend. Allows for still passing full object to backend for future extensability * fix: Generate missing wrapper TS interface * fix: Add title and message to notification * refactor: Move constant to consts file * fix: Fix formatting * fix: Remove unnecessary property declaration
2023-03-26fix: Remove redundant string conversions (#242)GeckoEidechse
As pointed out by clippy
2023-03-26refactor: Replace all `println!()` with log statements (#236)GeckoEidechse
* refactor: Replace all println with calls to logger in `do_install()` * refactor: Replace all println with calls to logger in `verify_install_location()` * refactor: Replace all println with calls to logger in `get_northstar_release_notes()` * refactor: Replace all println with calls to logger in `update_northstar_caller()` * refactor: Replace all println with calls to logger in `install_northstar_caller()` * refactor: Replace all println with calls to logger in `apply_launcher_pr()` * refactor: Replace all println with calls to logger in `apply_mods_pr()` * refactor: Replace all println with calls to logger in `find_game_install_location()` * refactor: Replace all println with calls to logger in `install_mod_caller()` * refactor: Replace all println with calls to logger in `set_mod_enabled_status()` * refactor: Replace all println with calls to logger in `parse_installed_mods()` * refactor: Replace all println with calls to logger in `origin_install_location_detection()` * refactor: Replace all println with calls to logger in `query_thunderstore_packages_api()` * refactor: Replace all println with calls to logger in `add_batch_file()` * refactor: Replace all println with calls to logger in `extract()` * refactor: Replace all println with calls to logger in `check_is_northstar_outdated()`
2023-03-21Add buttons to download PRs (#203)GeckoEidechse
* feat: Add button to download Mods PR Simply opens the browser on the repo download link * feat: Add button to download Launcher PR Uses existing function to fetch nightly.link link and opens it in browser * refactor: Open Mods PR download link via TS as opposed to having a link directly This way it acts the same way as the Launcher PR download button. Reason behind this change being consistent UI style. * chore: Revert introduced formatting changes Those were added by accident, whoops * fix: Remove introduced unused dependency * fix: Remove unused dependencies
2023-03-21feat: Proper logging (#223)GeckoEidechse
* feat: Initial setup of sentry logging * refactor: Replace some println with log call Not replacing all cause too large diff
2023-03-19refactor: Fix PR downloads permission issue (#217)GeckoEidechse
* fix: Download PRs into Titanfall2 folder Avoids any folder write permission issues * fix: Download Mod PRs into Titanfall2 folder Avoids any folder write permission issues * build: Add libraries for zip extract * refactor: Download mods zip into memory and extract it from there directly into Titanfall2 dir * fix: Stop creating unneeded temp download folder * refactor: Download launcher zip into memory and extract it from there into a temp folder then only copy out necessary files and delete the rest * docs: Add comment * refactor: Remove unused functions * fix: Smoothly handle misformatted zip file Usually caused by the downloaded file not actually being a zip Catches the error and displays error message if it occurs. * feat: Exit early if download was unsuccessful * chore: Remove leftover commented out code * fix: Write mod files into correct subdirectory Was writing them into parent instead by accident which meant that Northstar wouldn't actually find it. * refactor: Define profile path once Instead of recreating the string everytime
2023-03-02feat: Allow installing PRs from DeveloperView (#139)GeckoEidechse
* feat: Initial backend code to get list of PRs Hardcoded for launcher right now * refactor: Autogen TS bindings from Rust code using `ts-rs` as done in #140 * fix: Fix incorrect typing What is returned is actually an array of `PullsApiResponseElement` * feat: Prototyping frontend UI for installing PR * fix: Use right repo Used Mods instead of Launcher * feat: Enable installing launcher pull request * refactor: Rename variables to indicate approp repo NorthstarLauncher vs NorthstarMods * style: Formatting fixes * feat: Initial code for getting mods PRs * feat: Add backend code for installing mods PRs * feat: Add note about launching in notification * fix: Remove commented out code * refactor: Depduplicate code * refactor: Remove unnecessary use of anyhow * refactor: Use already existing function for checking game path * feat: Add comment about profile / batch file * chore: Remove leftover print statements * feat: Add clickable link for each PR * refactor: Reduce duplicate code * refactor: Rename enum * fix: Use proper type * fix: Remove leftover `console.log`s * style: Revert accidental formatting change * refactor: Remove second API call for mods PRs * refactor: Rename variable * refactor: Remove second API call for launcher PRs * refactor: Move API URL string to `constants.rs` So that all constants are in a single place * fix: Restore lines deleted in merge * style: Formatting fixes * fix: Print line when done installing PR * feat: Show notification for install start/done Displays a notification that PR install has started and upon completion replaces it with one saying that install has completed. * fix: Remove left-over console log * feat: "Install PR" UI (#197) * refactor: export pull requests selector to dedicated component * refactor: regroup launcher+mods collapses in one collapse component * refactor: load pull requests when opening selector collapse item * refactor: review progress loaders' style * fix: don't fetch PRs if they've already been loaded * feat: update collapse style * refactor: remove fetch success notification * refactor: both collapses can be opened at the same time * fix: non-accordion collapse sends an object as event parameter * fix: Iterate over multiple pages of GitHub CI API This ensures we can still grab older artifacts. Max page is capped at 10 as going too high will cause us to hit API rate limits. Also refined error message accordingly. * refactor: Move stored PRs to submodule as suggested in review * refactor: Move getPullRequests to store submodule I order to clean up PullRequestSelector.vue Other functions will follow in separate commits. Currently TypeScript compilation fails on undefined type of `state` * fix: Properly define state type * refactor: Move installLauncherPR to store submodule * refactor: Move installModsPR to store submodule --------- Co-authored-by: Rémy Raes <contact@remyraes.com>
2023-02-05feat: Auto-generate TS bindings (#140)GeckoEidechse
* feat: Initial trial to auto-generate TS bindings That way instead of manually duplicating code, we can just run `cargo test` to generate them. * fix: Update forgotten imports * refactor: Move FlightCoreVersion to autogen bind TypeScript binding autogenerated from Rust code * refactor: Move ReleaseInfo to autogen binding TypeScript binding autogenerated from Rust code * docs: Explain how to generate TS binds from Rust * feat: Check for binding changes in CI Checks for uncommitted binding changes in CI and fails if they differ * style: Formatting fixes
2023-01-07refactor: Store global const in separate file (#131)GeckoEidechse
Moved user agent there for now
2023-01-04feat: Show newest version number (#124)GeckoEidechse
* refactor: Move getting new FC version to own func * refactor: Deserialize into object * refactor: Return whole object instead of 2 strings More readable * refactor: Rename variable * refactor: Use fields of object directly instead of assigning to variables first * feat: Expose backend func to get newest FC version and then call it to get newest version number if current is outdated. This way we can display to the user how far behind their currently installed version is.
2023-01-04refactor: Deserialize into struct directly (#127)GeckoEidechse
Instead of deserializing into a generic serde struct and then extracting specific value from it, deserialize directly into the struct we want.
2022-12-01feat: Threshold before showing update notification (#98)GeckoEidechse
* feat: Threshold before showing update notification This way we don't spam the end-user with an update notification before an update is fully build and released * fix: Push missing dependencies * fix: Adjust delay to 2 hours
2022-11-28style: Auto-format all Rust code (#84)GeckoEidechse
2022-11-25chore: Update all references of personal repo (#70)GeckoEidechse
and change them to R2NorthstarTools org
2022-11-14refactor: Move GitHub API fetch to submodule and re-use existing function (#51)GeckoEidechse
* refactor: Import all functions from lib So that I don't need to update the header each time I add/remove a function. * refactor: Move function to submodule Move it to module for GitHub API related tasks. * refactor: Re-use existing func for fetching GH API
2022-11-13refactor: Splice out GH release API fetch function (#47)GeckoEidechse
So that it can be re-used by other functions later such as for checking newest FlightCore version by checking against GitHub releases.
2022-11-09feat: Patch notes (#18)Rémy Raes
* feat: add Rust method to fetch Northstar release notes * feat: fetch release notes on changelog view mount * feat: only transmit some info to frontend GitHub API gives much information about releases, we only need some: name, publication date and content of such release; so other information is not transmitted to UI. * feat: add ReleaseInfo Typescript interface matching Rust struct * feat: display release notes on a timeline * refactor: remove old releases external link * build: add marked dependency * build: add marked types dev dependency * feat: format release notes' markdown * fix: member typo in ReleaseInfo interface * fix: type releases array * fix: open github links in external browser * fix: adjust marked import * refactor: store release notes in store Release notes are now stored in the app store, so we don't have to fetch them multiple times. * fix: notes fetching method is now async * feat: display a loading bar while release notes are being fetched * feat: display dates in white * feat: release notes' dates are human-readable * fix: make menu bar appear on top of release notes view when scrolled * feat: add custom scrollbar * refactor: format releases creation to please reviewer * Update src-tauri/src/github/mod.rs * Update src-tauri/src/github/release_notes.rs * Update src-vue/src/utils/ReleaseInfo.d.ts * fix: augment scrollbar opacity * fix: only display releases' release date (no more time of the day) * fix: adjust Github request user agent * style: add missing end line in src-vue/src/style.css * fix: link formatting only targets GitHub PR links (whose name begins with a #) * fix: timeline element children cannot be bigger than container card