From afaaca72ae4002faf002b403dee2c1fe43b49626 Mon Sep 17 00:00:00 2001 From: "Robert (Jamie) Munro" Date: Fri, 28 Nov 2025 12:11:00 +0000 Subject: [PATCH 1/4] Fix URL extraction for pagination in search results --- SearchResults.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SearchResults.js b/SearchResults.js index 20d0afb..48273fc 100644 --- a/SearchResults.js +++ b/SearchResults.js @@ -125,8 +125,11 @@ function SearchResults() { var nextLinks = linksHeader.split(",").filter(function (link) { return link.endsWith(nextLinkSuffix); }); if (nextLinks.length > 0) { var nextLink = nextLinks[0]; - nextLink = nextLink.substring(1, nextLink.length - nextLinkSuffix.length - 1); - getPage(nextLink); + // Extract URL from ; rel="next" format + var match = nextLink.match(/<([^>]+)>/); + if (match) { + getPage(match[1]); + } } else if (onComplete) onComplete(pullRequests, totalCount); }) From b57b9c040c6d69fd62f0e6e00858c137f767b24b Mon Sep 17 00:00:00 2001 From: "Robert (Jamie) Munro" Date: Fri, 28 Nov 2025 12:39:40 +0000 Subject: [PATCH 2/4] Disable automatic check for updates script for now It was getting 403 forbidden errors due to rate limit exceeded, even though the other API request was working. I guess there are different buckets of rate limits for different APIs. --- OpenPRs.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenPRs.html b/OpenPRs.html index 0c64d94..1b1de54 100644 --- a/OpenPRs.html +++ b/OpenPRs.html @@ -228,7 +228,7 @@ ko.applyBindings(viewModel); }); - + From e2c364a0a43493ffc1ac3bd0c8e1430c45326883 Mon Sep 17 00:00:00 2001 From: "Robert (Jamie) Munro" Date: Fri, 28 Nov 2025 12:49:00 +0000 Subject: [PATCH 3/4] Remove Travis build stuff --- OpenPRs.html | 7 ++---- TravisBuilds.js | 55 ------------------------------------------- credentials.sample.js | 3 --- 3 files changed, 2 insertions(+), 63 deletions(-) delete mode 100644 TravisBuilds.js diff --git a/OpenPRs.html b/OpenPRs.html index 1b1de54..0098d80 100644 --- a/OpenPRs.html +++ b/OpenPRs.html @@ -9,7 +9,7 @@ - +

Loading...

@@ -215,16 +215,13 @@ - diff --git a/TravisBuilds.js b/TravisBuilds.js deleted file mode 100644 index ad9e787..0000000 --- a/TravisBuilds.js +++ /dev/null @@ -1,55 +0,0 @@ -function TravisBuilds(repo, branch) { - var self = this; - - self.buildState = ko.observable(); - self.previousBuildState = ko.observable(); - - function specificState(buildState, state) { - return ko.pureComputed(function () { return buildState() == state; }); - } - self.created = specificState(self.buildState, "created"); - self.started = specificState(self.buildState, "started"); - self.passed = specificState(self.buildState, "passed"); - self.failed = specificState(self.buildState, "failed"); - - self.building = ko.pureComputed(function() { return self.created() || self.started(); }); - - self.lastCompleteBuildState = ko.pureComputed(function() { - return self.building() ? self.previousBuildState() : self.buildState(); - }); - self.lastCompleteBuildPassed = specificState(self.lastCompleteBuildState, "passed"); - self.lastCompleteBuildFailed = specificState(self.lastCompleteBuildState, "failed"); - - function request(method, uri, data, success) { - return $.ajax( - { - type: method, - url: "https://api.travis-ci.com" + uri, - beforeSend: function(jqXHR, settings) { - jqXHR.setRequestHeader("Travis-API-Version", "3"); - jqXHR.setRequestHeader("Authorization", "token " + travisAccessCode); - return true; - }, - data: data, - dataType: "json", - success: success - }); - } - - function get(uri, success) { return request("GET", uri, null, success); } - function post(uri, data, success) { return request("POST", uri, data, success); } - - self.update = function() { - get( - "/repo/" + encodeURIComponent(repo) + "/branch/" + encodeURIComponent(branch), - function (data, textStatus, jqXHR) { - self.buildState(data.last_build.state); - self.previousBuildState(data.last_build.previous_state); - }); - } - - self.load = function () { - self.update(); - setInterval(function() { self.update(); }, 1 * 60 * 1000); - }; -} diff --git a/credentials.sample.js b/credentials.sample.js index 0ab4809..7d2d7ee 100644 --- a/credentials.sample.js +++ b/credentials.sample.js @@ -6,9 +6,6 @@ var username = "username"; // A personal access token from https://github.com/settings/tokens var accessCode = "token"; -// An API token from https://developer.travis-ci.com/authentication -var travisAccessCode = "token"; - // ///////////////////// Leave the below ///////////////////// $.ajaxSetup({ From 979ec2e0f248bc0f2fd95a663efd05803b0b78e3 Mon Sep 17 00:00:00 2001 From: "Robert (Jamie) Munro" Date: Fri, 28 Nov 2025 13:18:18 +0000 Subject: [PATCH 4/4] Add GitHub Pages deployment workflow --- .github/workflows/deploy.yml | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..fac3071 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,55 @@ +name: Deploy to GitHub Pages + +on: + # Deploy automatically when pushing to master + push: + branches: + - master + # Allow manual deployment from the Actions tab + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + # Currently deploying static files directly. + # When upgrading to Vite, add build steps here: + # + # - name: Setup Node + # uses: actions/setup-node@v4 + # with: + # node-version: '20' + # + # - name: Install dependencies + # run: npm ci + # + # - name: Build + # run: npm run build + # + # Then change the upload path below from '.' to './dist' (or your build output directory) + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Deploy everything in the root directory + # Change to './dist' when using Vite + path: '.' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4