Skip to content

Commit

Permalink
get builds from store repo
Browse files Browse the repository at this point in the history
  • Loading branch information
nishinji committed Jun 24, 2024
1 parent 69f2518 commit 6f4ee13
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
3 changes: 1 addition & 2 deletions LICENSE.md → LICENSE
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Copyright 2024 Vita3K
Copyright 2024 Vita3K-team

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Vita3KBot
A bot for the Vita3K Discord server.
16 changes: 9 additions & 7 deletions Vita3KBot/APIClients/GithubClient/GithubClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,24 @@ public static class GithubClient {
public static async Task<Embed> GetLatestBuild() {

GitHubClient github = new GitHubClient(new ProductHeaderValue("Vita3KBot"));
Release latestRelease = await github.Repository.Release.Get("Vita3k", "Vita3k", "continuous");
ReleaseAsset windowsRelease = latestRelease.Assets.Where(release => {
Release latestRelease = await github.Repository.Release.Get("Vita3K", "Vita3K", "continuous");
string commit = latestRelease.Body.Substring(latestRelease.Body.IndexOf(":") + 1).Trim();
commit = commit.Substring(0, commit.IndexOf("\n"));
Release buildRelease = await github.Repository.Release.Get("Vita3K", "Vita3K-builds", commit);

ReleaseAsset windowsRelease = buildRelease.Assets.Where(release => {
return release.Name.StartsWith("windows-latest");
}).First();
ReleaseAsset linuxRelease = latestRelease.Assets.Where(release => {
ReleaseAsset linuxRelease = buildRelease.Assets.Where(release => {
return release.Name.StartsWith("ubuntu-latest");
}).First();
ReleaseAsset appimageRelease = latestRelease.Assets.Where(release => {
ReleaseAsset appimageRelease = buildRelease.Assets.Where(release => {
return release.Name.StartsWith("Vita3K-x86_64.AppImage");
}).First();
ReleaseAsset macosRelease = latestRelease.Assets.Where(release => {
ReleaseAsset macosRelease = buildRelease.Assets.Where(release => {
return release.Name.StartsWith("macos-latest");
}).First();

string commit = latestRelease.Body.Substring(latestRelease.Body.IndexOf(":") + 1).Trim();
commit = commit.Substring(0, commit.IndexOf("\n"));
GitHubCommit REF = await github.Repository.Commit.Get("Vita3k", "Vita3k", commit);
Issue prInfo = await GetPRInfo(github, commit);

Expand Down

0 comments on commit 6f4ee13

Please sign in to comment.