Skip to content

Commit dc7e4fb

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/model-fallback-usage-refresh
2 parents f78151e + 783581d commit dc7e4fb

4 files changed

Lines changed: 63 additions & 24 deletions

File tree

‎.github/workflows/desktop-macos-preview-publish.yml‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,19 @@ jobs:
7777
return;
7878
}
7979
80-
// workflow_run.pull_requests is empty for fork PRs, so resolve the
81-
// PR from the built commit instead and require exactly one open PR
82-
// from the same head repository and branch. The build baked its
80+
// workflow_run.pull_requests and the commit-to-PR lookup are both
81+
// empty for fork PRs, so list open PRs by head owner and branch
82+
// and require exactly one at the built commit. The build baked its
8383
// PR number into the version, so two candidates would mean the
8484
// asset name could belong to either.
85-
const associated = await github.paginate(
86-
github.rest.repos.listPullRequestsAssociatedWithCommit,
87-
{ owner, repo, commit_sha: run.head_sha, per_page: 100 },
88-
);
89-
const matching = associated.filter(
85+
const open = await github.paginate(github.rest.pulls.list, {
86+
owner,
87+
repo,
88+
state: "open",
89+
head: `${run.head_repository?.owner?.login}:${run.head_branch}`,
90+
per_page: 100,
91+
});
92+
const matching = open.filter(
9093
(candidate) =>
9194
candidate.state === "open" &&
9295
candidate.head.sha === run.head_sha &&

‎.github/workflows/mobile-fingerprint-label.yml‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,18 @@ jobs:
5353
return;
5454
}
5555
56-
// workflow_run.pull_requests is empty for fork PRs, so resolve the
57-
// PR from the checked commit. Requiring the PR's current head to be
58-
// that commit keeps a slow run for an older push from overwriting a
59-
// newer result.
60-
const associated = await github.paginate(
61-
github.rest.repos.listPullRequestsAssociatedWithCommit,
62-
{ owner, repo, commit_sha: run.head_sha, per_page: 100 },
63-
);
64-
const matching = associated.filter(
56+
// workflow_run.pull_requests and the commit-to-PR lookup are both
57+
// empty for fork PRs, so list open PRs by head owner and branch.
58+
// Requiring the PR's current head to be the checked commit keeps a
59+
// slow run for an older push from overwriting a newer result.
60+
const open = await github.paginate(github.rest.pulls.list, {
61+
owner,
62+
repo,
63+
state: "open",
64+
head: `${run.head_repository?.owner?.login}:${run.head_branch}`,
65+
per_page: 100,
66+
});
67+
const matching = open.filter(
6568
(candidate) =>
6669
candidate.state === "open" &&
6770
candidate.head.sha === run.head_sha &&

‎README.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@ yay -S t3code-nightly-bin
8484

8585
The AUR packaging is maintained in this repository under [`packaging/aur`](./packaging/aur).
8686

87+
#### Nix (nixpkgs)
88+
89+
```bash
90+
nix profile add github:NixOS/nixpkgs/nixos-unstable#t3code
91+
```
92+
93+
The package is maintained in [nixpkgs](https://github.com/NixOS/nixpkgs/tree/nixos-unstable/pkgs/by-name/t3/t3code)
94+
and includes the desktop app (`t3code-desktop`) and the `t3` command.
95+
See [Nix installation](./docs/user/install.md#nix-nixpkgs) for NixOS configuration and updates.
96+
8797
## Some notes
8898

8999
We are very very early in this project. Expect bugs.

‎docs/user/install.md‎

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,41 @@ update it with `git pull` and a rebuild.
6565
Download a release from [GitHub Releases](https://github.com/pingdotgg/t3code/releases),
6666
or use a package manager:
6767

68-
| Platform | Install |
69-
| ------------------ | ---------------------------------- |
70-
| Windows | `winget install T3Tools.T3Code` |
71-
| macOS | `brew install --cask t3-code` |
72-
| Debian, Ubuntu | `sudo apt install ./T3-Code-*.deb` |
73-
| Arch Linux | `yay -S t3code-bin` |
74-
| Arch Linux nightly | `yay -S t3code-nightly-bin` |
68+
| Platform | Install |
69+
| ------------------ | ------------------------------------------------------------ |
70+
| Windows | `winget install T3Tools.T3Code` |
71+
| macOS | `brew install --cask t3-code` |
72+
| Debian, Ubuntu | `sudo apt install ./T3-Code-*.deb` |
73+
| Arch Linux | `yay -S t3code-bin` |
74+
| Arch Linux nightly | `yay -S t3code-nightly-bin` |
75+
| Nix | `nix profile add github:NixOS/nixpkgs/nixos-unstable#t3code` |
7576

7677
The `.deb` updates itself like the other desktop builds. It asks for your
7778
password to install each update. If your desktop has no password prompt, the
7879
update fails. Download the new `.deb` and install it the same way.
7980

81+
### Nix (nixpkgs)
82+
83+
T3 Code is maintained in [nixpkgs](https://github.com/NixOS/nixpkgs/tree/nixos-unstable/pkgs/by-name/t3/t3code).
84+
The command above installs from `nixos-unstable` and requires Nix 2.30 or later with
85+
`nix-command` and `flakes` enabled. Launch the desktop app with `t3code-desktop`;
86+
the package also includes the `t3` command.
87+
88+
On NixOS, you can instead add the package to your system configuration, using
89+
a nixpkgs revision that includes `t3code`:
90+
91+
```nix
92+
environment.systemPackages = [ pkgs.t3code ];
93+
```
94+
95+
Apply the change with `sudo nixos-rebuild switch`. For Home Manager, add
96+
`pkgs.t3code` to `home.packages` and run `home-manager switch`.
97+
98+
Update a profile installation with `nix profile upgrade t3code`. For NixOS or
99+
Home Manager, update your configuration's nixpkgs input or channel and rebuild.
100+
Nix manages both the desktop app and the bundled
101+
`t3` command; use Nix to update them instead of the in-app updater or `t3 update`.
102+
80103
### The `t3` command
81104

82105
The desktop app includes the `t3` command-line tool. To run it from any

0 commit comments

Comments
 (0)