1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2026-05-22 10:15:43 +02:00
Commit Graph

7499 Commits

Author SHA1 Message Date
Stefan Haller c0d9640c0b Hide closed pull requests on main branches
The assumption is that if a pull request exists on a main branch, it was usually
created by mistake and then closed, and showing it serves no purpose and is only
distracting.

We keep showing open pull requests for main branches though, because this allows
you to notice that there is one that you probably want to close.

This only affects the display (in the branches list and in the main view);
opening the PR in the browser using shift-G is still possible, as is copying its
URL to the clipboard.
2026-04-13 21:56:49 +02:00
Stefan Haller dba814c1df Change contribution policy (#5498) 2026-04-13 21:50:18 +02:00
Stefan Haller aef4feb501 Discourage contributions 2026-04-13 21:48:08 +02:00
Stefan Haller dff44dde18 Add a warning about adding new config options (#5507) 2026-04-13 21:37:32 +02:00
Stefan Haller 913e118d12 Add a warning about adding new config options 2026-04-13 14:09:08 +02:00
Stefan Haller 600ff21b47 Make the TOC entries links 2026-04-13 14:09:08 +02:00
Stefan Haller 6c2b9d5b01 Fix heading level 2026-04-13 14:06:16 +02:00
Stefan Haller 38dd035e28 Normalize repository owner casing to fix GitHub PR integration (#5495)
### PR Description

Close #5494 

Normalizes the repository owner to lowercase during the PR mapping.
This ensures that PR icons and integration features work correctly even
when the local git remote URL casing differs from the official
repository casing on GitHub.
2026-04-10 18:49:37 +02:00
Bradly Chang 6eda4c0aab Fix case-insensitive remote URL matching for GitHub PRs
Normalizes the repository owner to lowercase during the PR
mapping.
This ensures that PR icons and integration features work correctly even
when the local git remote URL casing differs from the official
repository casing on GitHub.
2026-04-10 01:36:10 +08:00
Stefan Haller 8f258a3650 Add a justfile (#5490)
Just (https://just.systems/) works better than make for running
commands. For example, passing arguments to `make integration-test-cli`
requires a `--` between make's arguments and the cli test runner's
arguments (e.g. -sandbox), and will also result in weird errors. Just
doesn't have any of these problems.

I chose different target names than we use in the Makefile; the goal is
to have better tab completion, where the most commonly used commands can
be completed after typing a single letter. That's why I use "e2e" for
integration tests, which is not a term we use anywhere else.

Keeping the Makefile around for those who are used to it, and are too
lazy to install just.
2026-04-08 19:29:36 +02:00
Stefan Haller 665fcbf389 Add a justfile
Just (https://just.systems/) works better than make for running commands. For
example, passing arguments to `make integration-test-cli` requires a `--`
between make's arguments and the cli test runner's arguments (e.g. -sandbox),
and will also result in weird errors. Just doesn't have any of these problems.

I chose different target names than we use in the Makefile; the goal is to have
better tab completion, where the most commonly used commands can be completed
after typing a single letter. That's why I use "e2e" for integration tests,
which is not a term we use anywhere else.

Keeping the Makefile around for those who are used to it, and are too lazy to
install just.
2026-04-08 19:07:58 +02:00
Stefan Haller 84b7d1e266 Security fix: avoid using ${{ }} variable interpolation in run: steps (#5487)
## Summary
Fix high severity security issue in `.github/workflows/release.yml`.

## Vulnerability
| Field | Value |
|-------|-------|
| **ID** |
yaml.github-actions.security.run-shell-injection.run-shell-injection |
| **Severity** | HIGH |
| **Scanner** | semgrep |
| **Rule** |
`yaml.github-actions.security.run-shell-injection.run-shell-injection` |
| **File** | `.github/workflows/release.yml:113` |

**Description**: Using variable interpolation `${{...}}` with `github`
context data in a `run:` step could allow an attacker to inject their
own code into the runner. This would allow them to steal secrets and
code. `github` context data can have arbitrary user input and should be
treated as untrusted. Instead, use an intermediate environment variable
with `env:` to store the data and use the environment variable in the
`run:` script. Be sure to use double-quotes the environment variable,
like this: "$ENVVAR".

## Changes
- `.github/workflows/release.yml`

## Verification
- [x] Build passes
- [x] Scanner re-scan confirms fix
- [x] LLM code review passed

---
*Automated security fix by [OrbisAI Security](https://orbisappsec.com)*
2026-04-08 10:20:11 +02:00
Ubuntu 4caee0886b fix: yaml.github-actions.security.run-shell-injection.run-shell-injection security vulnerability
Automated security fix generated by Orbis Security AI
2026-04-08 04:49:26 +00:00
Stefan Haller bb5d5f2deb Update docs and schema for release (#5477) v0.61.0 2026-04-06 19:37:08 +02:00
Stefan Haller ffe645c503 Update docs and schema for release 2026-04-06 19:33:14 +02:00
Stefan Haller 26faf9d20f Update translations from Crowdin (#5476) 2026-04-06 19:31:47 +02:00
Stefan Haller f47ee726c7 Update translations from Crowdin 2026-04-06 19:29:09 +02:00
Stefan Haller 7f5250a64a Add condition field to custom command prompts (#5364)
When building multi-step custom command forms, some prompts are only
relevant depending on earlier answers. Without conditional logic, users
must dismiss irrelevant prompts manually.

Prompts now accept a `condition` field with a template expression
evaluated against prior form values. Skipped prompts default to an empty
string.
2026-04-06 19:17:54 +02:00
Martin T. 4cb6fafb08 Add condition field to custom command prompts
When building multi-step custom command forms, some prompts are only
relevant depending on earlier answers. Without conditional logic,
users must dismiss irrelevant prompts manually.

Prompts now accept a `condition` field with a template expression
evaluated against prior form values. Skipped prompts default to
an empty string.

The template expression is a string pre- and suffixed with double curly
braces - {{}}.

Form keys can be reused, a guard ensures that skipped prompts do not
reset already set form keys with an empty string. This allows the
conditional flow to remind a user to set a key that was left empty
because additional conditions want that key to be set. This removes the
need to have additional if checks in the command that uses the form
keys.
2026-04-06 19:14:51 +02:00
Stefan Haller 2057dc1ea9 Log hashes of local branches when deleting them (#5441)
This makes it easier to recover them if they were deleted accidentally.

We only do this for local branches for now, we don't bother for remote
branches; it would be trickier there, because the branch on the server
might not actually point to the same hash as our local remote tracking
branch does.

Fixes #2468.
2026-04-06 19:10:03 +02:00
Stefan Haller e4309f101c Log hashes of local branches when deleting them
This makes it easier to recover them if they were deleted accidentally.

We only do this for local branches for now, we don't bother for remote branches;
it would be trickier there, because the branch on the server might not actually
point to the same hash as our local remote tracking branch does.
2026-04-06 19:06:25 +02:00
Stefan Haller 710a73e351 Add missing quote 2026-04-06 19:06:25 +02:00
Stefan Haller 7918858023 Localize "Dropping stash" log
This was forgotten in #4850.
2026-04-06 19:06:25 +02:00
Stefan Haller 4c2c0ce32d Bump github.com/sasha-s/go-deadlock from 0.3.6 to 0.3.9 (#5460)
Bumps
[github.com/sasha-s/go-deadlock](https://github.com/sasha-s/go-deadlock)
from 0.3.6 to 0.3.9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sasha-s/go-deadlock/releases">github.com/sasha-s/go-deadlock's
releases</a>.</em></p>
<blockquote>
<h2>v0.3.9</h2>
<p>Reduce allocations from callers (<a
href="https://redirect.github.com/sasha-s/go-deadlock/issues/54">#54</a>),
add new unit tests, and fix existing -race unit test failures</p>
<h2>v0.3.8</h2>
<h2>What's Changed</h2>
<ul>
<li>Reduce allocations per lock request (<a
href="https://redirect.github.com/sasha-s/go-deadlock/issues/52">#52</a>)
— replaces goroutine-per-lock deadlock detection with
<code>time.AfterFunc</code> + <code>sync.Pool</code>, cutting
allocations from 4 to 2 per lock/unlock cycle (~40% throughput
improvement).</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sasha-s/go-deadlock/compare/v0.3.7...v0.3.8">https://github.com/sasha-s/go-deadlock/compare/v0.3.7...v0.3.8</a></p>
<h2>v0.3.7</h2>
<p>Release v0.3.7</p>
<h2>Changes</h2>
<ul>
<li>Fix <code>testing/synctest</code> compatibility, including Go 1.25
support and related build tags</li>
<li>Fix concurrent lock tracking under contention</li>
<li>Prevent lock-order tracking from retaining mutex-containing structs
on Go 1.24+</li>
</ul>
<h2>What's New</h2>
<p>This release improves <code>synctest</code> compatibility, fixes
concurrent lock tracking, and resolves a GC-retention issue in
lock-order bookkeeping.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/sasha-s/go-deadlock/commit/c1cf6f86578b9f21559dbeb6f8a336b0ee78468b"><code>c1cf6f8</code></a>
reduce allocations from callers (<a
href="https://redirect.github.com/sasha-s/go-deadlock/issues/54">#54</a>)</li>
<li><a
href="https://github.com/sasha-s/go-deadlock/commit/dcbba57e999dec2501fff32e3ade3e230cc31ae4"><code>dcbba57</code></a>
reduce allocations (<a
href="https://redirect.github.com/sasha-s/go-deadlock/issues/52">#52</a>)</li>
<li><a
href="https://github.com/sasha-s/go-deadlock/commit/3e259398a7b831fd2f7e94eba693b3c3d0a3ef8c"><code>3e25939</code></a>
chore: switch default branch to main</li>
<li><a
href="https://github.com/sasha-s/go-deadlock/commit/7c2aeedd0c75ca4e134dc666ba9eed2f9d6a9bb4"><code>7c2aeed</code></a>
fix: use weak pointers in lock order map to prevent GC leak (issue <a
href="https://redirect.github.com/sasha-s/go-deadlock/issues/46">#46</a>)
(<a
href="https://redirect.github.com/sasha-s/go-deadlock/issues/49">#49</a>)</li>
<li><a
href="https://github.com/sasha-s/go-deadlock/commit/b762e81bdbe9b5099ff85b7b86134e607afd84b3"><code>b762e81</code></a>
fix concurrent lock tracking (issue 47) (<a
href="https://redirect.github.com/sasha-s/go-deadlock/issues/48">#48</a>)</li>
<li><a
href="https://github.com/sasha-s/go-deadlock/commit/55685097fb9afd7c736f6fd56c4e0e1a03759b61"><code>5568509</code></a>
Fix/synctest compatibility (<a
href="https://redirect.github.com/sasha-s/go-deadlock/issues/42">#42</a>)</li>
<li>See full diff in <a
href="https://github.com/sasha-s/go-deadlock/compare/v0.3.6...v0.3.9">compare
view</a></li>
</ul>
</details>
<br />
2026-04-01 11:27:21 +02:00
dependabot[bot] 5928e851dd Bump github.com/sasha-s/go-deadlock from 0.3.6 to 0.3.9
Bumps [github.com/sasha-s/go-deadlock](https://github.com/sasha-s/go-deadlock) from 0.3.6 to 0.3.9.
- [Release notes](https://github.com/sasha-s/go-deadlock/releases)
- [Commits](https://github.com/sasha-s/go-deadlock/compare/v0.3.6...v0.3.9)

---
updated-dependencies:
- dependency-name: github.com/sasha-s/go-deadlock
  dependency-version: 0.3.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 09:24:57 +00:00
Stefan Haller 8aaed47c63 Bump github.com/sahilm/fuzzy from 0.1.0 to 0.1.1 (#5459)
Bumps [github.com/sahilm/fuzzy](https://github.com/sahilm/fuzzy) from
0.1.0 to 0.1.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sahilm/fuzzy/releases">github.com/sahilm/fuzzy's
releases</a>.</em></p>
<blockquote>
<h2>v0.1.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix typo by <a
href="https://github.com/vlad-stoian"><code>@​vlad-stoian</code></a> in
<a
href="https://redirect.github.com/sahilm/fuzzy/pull/15">sahilm/fuzzy#15</a></li>
<li>AddingPowerSupport_For_golang-github-sahilm-fuzzy by <a
href="https://github.com/santosh653"><code>@​santosh653</code></a> in <a
href="https://redirect.github.com/sahilm/fuzzy/pull/18">sahilm/fuzzy#18</a></li>
<li>feat: fuzzy find without sorting by <a
href="https://github.com/caarlos0"><code>@​caarlos0</code></a> in <a
href="https://redirect.github.com/sahilm/fuzzy/pull/22">sahilm/fuzzy#22</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/vlad-stoian"><code>@​vlad-stoian</code></a>
made their first contribution in <a
href="https://redirect.github.com/sahilm/fuzzy/pull/15">sahilm/fuzzy#15</a></li>
<li><a
href="https://github.com/santosh653"><code>@​santosh653</code></a> made
their first contribution in <a
href="https://redirect.github.com/sahilm/fuzzy/pull/18">sahilm/fuzzy#18</a></li>
<li><a href="https://github.com/caarlos0"><code>@​caarlos0</code></a>
made their first contribution in <a
href="https://redirect.github.com/sahilm/fuzzy/pull/22">sahilm/fuzzy#22</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sahilm/fuzzy/compare/v0.1.0...v0.1.1">https://github.com/sahilm/fuzzy/compare/v0.1.0...v0.1.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/sahilm/fuzzy/commit/c48e322e2a8f19bbd962faf82eee4cf11dbf81ba"><code>c48e322</code></a>
feat: fuzzy find without sorting</li>
<li><a
href="https://github.com/sahilm/fuzzy/commit/c72cd382d3e5d909050f33a81c00a3c94f1efa47"><code>c72cd38</code></a>
Update .travis.yml</li>
<li><a
href="https://github.com/sahilm/fuzzy/commit/d88f8cb825ddd46a2ce86b60382e11645220ee33"><code>d88f8cb</code></a>
Fix typo</li>
<li><a
href="https://github.com/sahilm/fuzzy/commit/eaa29a3062e4b58bead472d25ca4b558e2d53d45"><code>eaa29a3</code></a>
Better description of <code>FindFrom</code></li>
<li><a
href="https://github.com/sahilm/fuzzy/commit/485b11793d7eabbfd950d919306b62242004e5e5"><code>485b117</code></a>
Fix typo</li>
<li>See full diff in <a
href="https://github.com/sahilm/fuzzy/compare/v0.1.0...v0.1.1">compare
view</a></li>
</ul>
</details>
<br />
2026-04-01 11:23:47 +02:00
dependabot[bot] 7d6c151296 Bump github.com/sahilm/fuzzy from 0.1.0 to 0.1.1
Bumps [github.com/sahilm/fuzzy](https://github.com/sahilm/fuzzy) from 0.1.0 to 0.1.1.
- [Release notes](https://github.com/sahilm/fuzzy/releases)
- [Commits](https://github.com/sahilm/fuzzy/compare/v0.1.0...v0.1.1)

---
updated-dependencies:
- dependency-name: github.com/sahilm/fuzzy
  dependency-version: 0.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 09:20:52 +00:00
Stefan Haller f12a77ca81 Bump github.com/integrii/flaggy from 1.4.0 to 1.8.0 (#5458)
Bumps [github.com/integrii/flaggy](https://github.com/integrii/flaggy)
from 1.4.0 to 1.8.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/integrii/flaggy/releases">github.com/integrii/flaggy's
releases</a>.</em></p>
<blockquote>
<h2>v1.8.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Add fish, PowerShell, and Nushell completion support by <a
href="https://github.com/integrii"><code>@​integrii</code></a> in <a
href="https://redirect.github.com/integrii/flaggy/pull/102">integrii/flaggy#102</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/integrii/flaggy/compare/v1.7.1...v1.8.0">https://github.com/integrii/flaggy/compare/v1.7.1...v1.8.0</a></p>
<h2>v1.7.1</h2>
<ul>
<li>Implemented a fix for a rare condition wherein a positional value
overlaps a subcommand with the same name.</li>
</ul>
<h2>v1.7.0</h2>
<p>This is a follow up v1.7.0 release after rapid re-release of v1.6.0
tag caused go module caching error. This release addresses nearly all
known issues and proposed feature additions of Flaggy while retaining a
no-dependency policy.</p>
<ul>
<li>Update module to Go 1.25</li>
<li>Streamline argument delegation between parsers</li>
<li>Clarify benchmark intent and document agent workflow</li>
<li>Fixes <a
href="https://redirect.github.com/integrii/flaggy/issues/68">#68</a> -
Subcommands and globals are displayed in different help sections on
subcommands</li>
<li>Refactored help output logic</li>
<li>Fixes <a
href="https://redirect.github.com/integrii/flaggy/issues/96">#96</a> -
Empty flag causes missing input error</li>
<li>Added Fixes <a
href="https://redirect.github.com/integrii/flaggy/issues/74">#74</a>
improved alignment on help output</li>
<li>Add benchmark tests</li>
<li>New gopher logo on README.md</li>
<li>Fixes <a
href="https://redirect.github.com/integrii/flaggy/issues/98">#98</a> -
add CONTRIBUTING.md</li>
</ul>
<h2>v1.6.0</h2>
<p><strong>🎉 First release since May 2022 thanks to AI! 🎉</strong></p>
<h3>Disruptive Changes:</h3>
<ul>
<li>Slice flags no longer automatically parse slice values with commas
into multiple values. To specify multiple values, use the flag multiple
times. For example, this will produce one value: <code>./app -f
one,two,three</code> and <code>./ -f one -f two -f three</code> will
produce three values in the slice. <a
href="https://redirect.github.com/integrii/flaggy/issues/90">#90</a></li>
</ul>
<h3>New Features:</h3>
<ul>
<li>Adds built-in bash and zsh completion generators. Use
<code>completion zsh</code> or <code>completion bash</code> on your app.
This is on my default. To disable, use
<code>flaggy.DisableCompletion()</code>. <a
href="https://redirect.github.com/integrii/flaggy/issues/1">#1</a></li>
<li>Flags can now be sorted alphabetically or reverse alphabetically
using <code>SortFlagsByLongName()</code> and
<code>SortFlagsByLongNameReversed()</code> <a
href="https://redirect.github.com/integrii/flaggy/issues/69">#69</a></li>
<li>Added a Github Action for test validation</li>
<li>Added support for all types in the go standard library!
•	[]net.IPMask
•	time.Time
•	url.URL
•	net.IPNet
•	net.TCPAddr
•	net.UDPAddr
•	os.FileMode
•	regexp.Regexp
•	time.Location
•	time.Month
•	time.Weekday
•	big.Int
•	big.Rat
•	netip.Addr</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/integrii/flaggy/commit/e0a0096c5f3c2cdf11ac97455ec375f0dcca5fed"><code>e0a0096</code></a>
Merge pull request <a
href="https://redirect.github.com/integrii/flaggy/issues/103">#103</a>
from integrii/codex/add-tests-for-shell-completion-su...</li>
<li><a
href="https://github.com/integrii/flaggy/commit/1c5bff698bb4d4875ae4e88bed94590fb5fcb324"><code>1c5bff6</code></a>
Fix completion shell coverage</li>
<li><a
href="https://github.com/integrii/flaggy/commit/1ec8867165cf39f68a5487be2d54b3515ecff187"><code>1ec8867</code></a>
Merge pull request <a
href="https://redirect.github.com/integrii/flaggy/issues/102">#102</a>
from integrii/codex/add-shell-auto-completion-support</li>
<li><a
href="https://github.com/integrii/flaggy/commit/6b9a8a171334283a1ad07934cd98b287ee6dfb29"><code>6b9a8a1</code></a>
Add additional shell completion generators</li>
<li><a
href="https://github.com/integrii/flaggy/commit/fd0925f3c950a529c2423a7af02a692e55eab3b5"><code>fd0925f</code></a>
update supported flag list</li>
<li><a
href="https://github.com/integrii/flaggy/commit/9147df756f52a28325706e1e845eb397d1637e03"><code>9147df7</code></a>
Update README.md</li>
<li><a
href="https://github.com/integrii/flaggy/commit/1fe0434886f3b178276df2fae393ba00a7953aa0"><code>1fe0434</code></a>
subcommand comments</li>
<li><a
href="https://github.com/integrii/flaggy/commit/3b2a42cccdf07a4e76ae56593d9607eb4df0fca6"><code>3b2a42c</code></a>
fix for when positionals match subcommand names causing an error</li>
<li><a
href="https://github.com/integrii/flaggy/commit/a7476ad7fee8e069d71a40d12b9b977854ec7b64"><code>a7476ad</code></a>
Update go-tests.yml</li>
<li><a
href="https://github.com/integrii/flaggy/commit/eb955a461ccb5b1ba92070a1f5773a00546ac59c"><code>eb955a4</code></a>
Update go-tests.yml</li>
<li>Additional commits viewable in <a
href="https://github.com/integrii/flaggy/compare/v1.4.0...v1.8.0">compare
view</a></li>
</ul>
</details>
<br />
2026-04-01 11:19:49 +02:00
dependabot[bot] dbb1ff4f24 Bump github.com/integrii/flaggy from 1.4.0 to 1.8.0
Bumps [github.com/integrii/flaggy](https://github.com/integrii/flaggy) from 1.4.0 to 1.8.0.
- [Release notes](https://github.com/integrii/flaggy/releases)
- [Commits](https://github.com/integrii/flaggy/compare/v1.4.0...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/integrii/flaggy
  dependency-version: 1.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 09:17:06 +00:00
Stefan Haller 03e75bd3ed Bump github.com/spkg/bom from 0.0.0-20160624110644-59b7046e48ad to 1.0.1 (#5457)
Bumps [github.com/spkg/bom](https://github.com/spkg/bom) from
0.0.0-20160624110644-59b7046e48ad to 1.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/spkg/bom/releases">github.com/spkg/bom's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.1</h2>
<p>Update to later version of go, remove CI that no longer works</p>
<h2>v1.0.0</h2>
<p>Add support for Go modules.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/spkg/bom/commits/v1.0.1">compare view</a></li>
</ul>
</details>
<br />
2026-04-01 11:15:48 +02:00
dependabot[bot] 5a4a917e6f Bump github.com/spkg/bom from 0.0.0-20160624110644-59b7046e48ad to 1.0.1
Bumps [github.com/spkg/bom](https://github.com/spkg/bom) from 0.0.0-20160624110644-59b7046e48ad to 1.0.1.
- [Release notes](https://github.com/spkg/bom/releases)
- [Commits](https://github.com/spkg/bom/commits/v1.0.1)

---
updated-dependencies:
- dependency-name: github.com/spkg/bom
  dependency-version: 1.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 08:59:55 +00:00
Stefan Haller 4b7388bbe3 Bump github.com/adrg/xdg from 0.4.0 to 0.5.3 (#5456)
Bumps [github.com/adrg/xdg](https://github.com/adrg/xdg) from 0.4.0 to
0.5.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/adrg/xdg/releases">github.com/adrg/xdg's
releases</a>.</em></p>
<blockquote>
<h2>v0.5.3</h2>
<h3>Changelog</h3>
<ul>
<li>Updated <code>xdg.SearchRuntimeFile</code> to also look in the
operating system's temporary directory for runtime files.
This covers unlikely cases in which runtime files cannot be written
relative to the base runtime directory either because it does not exist
or it is not accessible, so <code>xdg.RuntimeFile</code> suggests the
operating system's temporary directory as a suitable fallback
location.</li>
</ul>
<h3>Internal</h3>
<ul>
<li>Improved package testing.</li>
</ul>
<h2>v0.5.2</h2>
<h3>Changelog</h3>
<ul>
<li>
<p>Updated logic of <code>xdg.RuntimeFile</code>: due to the special
nature of the <code>runtime directory</code>, the function no longer
attempts to create it if it does not exist. If that's the case, the
function uses the operating system's <code>temporary directory</code> as
a fallback. The function still creates subdirectories relative to the
base runtime directory or its fallback.</p>
<p>Justification: the creation of the runtime directory is not in the
scope of this package as it has special requirements defined by the <a
href="https://specifications.freedesktop.org/basedir-spec/latest">XDG
Base Directory Specification</a>. Relevant excerpt:</p>
<blockquote>
<p>The lifetime of the directory MUST be bound to the user being logged
in. It MUST be created when the user first logs in and if the user fully
logs out the directory MUST be removed. If the user logs in more than
once they should get pointed to the same directory, and it is mandatory
that the directory continues to exist from their first login to their
last logout on the system, and not removed in between. Files in the
directory MUST not survive reboot or a full logout/login cycle.</p>
</blockquote>
<p>Also, on <code>Linux</code>, the parent directories of the default
user runtime directory are owned by the root user so they cannot be
created by a regular user. <a
href="https://www.freedesktop.org/software/systemd/man/latest/pam_systemd.html">pam_systemd</a>
is usually responsible for creating the runtime directory
(<code>/run/user/$UID</code>).</p>
</li>
</ul>
<h2>v0.5.1</h2>
<h3>Changelog</h3>
<ul>
<li>Added support for the non-standard <code>XDG_BIN_HOME</code> base
directory.
See <a
href="https://github.com/adrg/xdg?tab=readme-ov-file#xdg-base-directory">XDG
base directories</a> README section for more details.</li>
<li>Added more config and data search locations on <code>macOS</code>.
<ul>
<li>Added <code>~/.config</code> at the end of the list of default
locations for <code>XDG_CONFIG_DIRS</code>.</li>
<li>Added <code>~/.local/share</code> at the end of the list of default
locations for <code>XDG_DATA_DIRS</code>.</li>
</ul>
</li>
<li>Added more application search locations on <code>Windows</code>:
<ul>
<li><code>%ProgramFiles%</code></li>
<li><code>%ProgramFiles%\Common Files</code></li>
<li><code>%LOCALAPPDATA%\Programs</code></li>
<li><code>%LOCALAPPDATA%\Programs\Common</code></li>
</ul>
</li>
</ul>
<h3>Internal</h3>
<ul>
<li>Updated <code>golang.org/x/sys</code> dependency to the latest
version.</li>
<li>Improved package testing.</li>
</ul>
<h2>v0.5.0</h2>
<h3>Changelog</h3>
<ul>
<li><code>user-dirs.dirs</code> config file is now parsed on Unix-like
operating systems (except for macOS and Plan 9).
See <a
href="https://github.com/adrg/xdg?tab=readme-ov-file#xdg-user-directories">XDG
user directories</a> README section for more details.</li>
<li>Updated <code>golang.org/x/sys</code> dependency to the latest
version.</li>
</ul>
<h4>Internal</h4>
<ul>
<li>Moved all path related functionality in internal
<code>pathutil</code> package.</li>
<li>Added internal <code>userdirs</code> package:
<ul>
<li>Moved <code>xdg.UserDirectories</code> to
<code>userdirs.Directories</code>.</li>
<li>Added parsing functions for <code>user-dirs.dirs</code> config
file.</li>
</ul>
</li>
<li>Improved package testing.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/adrg/xdg/commit/aa865a51a1b35fd06925fd6b8604991e79e3167e"><code>aa865a5</code></a>
Merge pull request <a
href="https://redirect.github.com/adrg/xdg/issues/101">#101</a> from
adrg/update-search-runtime-file</li>
<li><a
href="https://github.com/adrg/xdg/commit/71a81eccf3e9ac9ebf03e8c11ca3ed60a06eac7f"><code>71a81ec</code></a>
Minor xdg.SearchRuntimeFile function documentation update</li>
<li><a
href="https://github.com/adrg/xdg/commit/88111eba52ac2a211b97194266db5207c975c266"><code>88111eb</code></a>
Minor example update in README.md and doc.go</li>
<li><a
href="https://github.com/adrg/xdg/commit/d9f76be86d944bf2b9bdb8544952111e2533f3ad"><code>d9f76be</code></a>
Improve non-existent runtime directory test case</li>
<li><a
href="https://github.com/adrg/xdg/commit/800775a49c0a7877af5dca22104b90dc7e788cd0"><code>800775a</code></a>
Update xdg.SearchRuntimeFile to also look in temporary directory</li>
<li><a
href="https://github.com/adrg/xdg/commit/2335a687b19a49dafb193856d64d911d33c4b3c1"><code>2335a68</code></a>
Merge pull request <a
href="https://redirect.github.com/adrg/xdg/issues/99">#99</a> from
adrg/improve-runtime-file</li>
<li><a
href="https://github.com/adrg/xdg/commit/221e50698e5b31d277289e971f645299279efdd5"><code>221e506</code></a>
Minor non-existent runtime directory test case fix on macOS</li>
<li><a
href="https://github.com/adrg/xdg/commit/9bbb6024b2e9ee213bbed1f63ae8ea6063767d5b"><code>9bbb602</code></a>
Minor error format improvement in pathutil.Create and
pathutil.Search</li>
<li><a
href="https://github.com/adrg/xdg/commit/987b3ce5c440036b799a21a633a699be91530d0a"><code>987b3ce</code></a>
Minor README.md update</li>
<li><a
href="https://github.com/adrg/xdg/commit/3c39d559725cf005c392630100f4f338b49daf24"><code>3c39d55</code></a>
Add non-existent runtime directory test case</li>
<li>Additional commits viewable in <a
href="https://github.com/adrg/xdg/compare/v0.4.0...v0.5.3">compare
view</a></li>
</ul>
</details>
<br />
2026-04-01 10:58:29 +02:00
dependabot[bot] a205bb74eb Bump github.com/adrg/xdg from 0.4.0 to 0.5.3
Bumps [github.com/adrg/xdg](https://github.com/adrg/xdg) from 0.4.0 to 0.5.3.
- [Release notes](https://github.com/adrg/xdg/releases)
- [Commits](https://github.com/adrg/xdg/compare/v0.4.0...v0.5.3)

---
updated-dependencies:
- dependency-name: github.com/adrg/xdg
  dependency-version: 0.5.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 08:19:10 +00:00
Stefan Haller a33f83cf76 Show pull requests against branches (#2781)
- **PR Description**

If the user has `gh` installed and is logged in (`gh auth login`),
lazygit shows GitHub PR icons next to the names of branches that have an
associated PR, colored by the PR's status (green=open, red=closed,
purple=merged).

Selecting a branch and pressing `shift-G` opens the PR in the browser.
2026-04-01 10:18:01 +02:00
Stefan Haller 6c8110f028 Add some brief documentation 2026-04-01 09:13:56 +02:00
Stefan Haller e92b04e1dc Don't refresh pull requests when checking out a local branch
For esthetic reasons, checking out a branch (or other ref) blocks the UI until
the refresh is done, so it's important that the refresh doesn't do unnecessary
work. Refreshing pull requests is unnecessary (but costly, when waiting for it)
when a branch is checked out that already existed locally. However, it is
required when checking out a remote branch for the first time, so that the PR
icon appears immediately when there is one.
2026-04-01 09:13:55 +02:00
Stefan Haller 6ba46ad604 Change "Copy pull request URL to clipboard" command to use existing PR if there is one 2026-04-01 09:13:55 +02:00
Stefan Haller a462b7c420 Add commands for opening a Github PR in the browser
For the branches panel we might consider unifying it with the existing `o`
command for creating a PR: it could check if there is a PR already, and open it
if so, or create a new one if not.

However, I also want the command in the local commits panel for the checked out
branch, and there's no existing "Create PR" command there; and the `o` command
opens the selected commit in the browser, so it's unrelated.
2026-04-01 09:13:55 +02:00
Stefan Haller 6145eaf939 Prompt only once per session for each repo
If the user hits escape in the "Select base repository for pull requests"
prompt, don't bother them again for this repo at the next refresh.
2026-04-01 09:13:55 +02:00
Stefan Haller 28affa3399 Add an optional onCancel hook for menus 2026-04-01 09:13:55 +02:00
Stefan Haller 7a0320b4ec Call OnMenuPress(nil) when hitting esc in a menu
OnMenuPress can already deal with the selected item being nil, so this allows us
to add common code to it that is run when cancelling the menu.
2026-04-01 09:13:55 +02:00
Stefan Haller 2ab78ad039 Show PR information in main view, above the branch log 2026-04-01 09:13:55 +02:00
Jesse Duffield fff6003044 Cache PRs in AppState so that they appear immediately at startup
Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
2026-04-01 09:13:55 +02:00
Jesse Duffield ca9eeebea3 Show PR icons in branches list
Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
2026-04-01 09:13:55 +02:00
Jesse Duffield d33fa5bb05 Add pull requests to lazygit's model and refresh them
Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
2026-04-01 09:13:55 +02:00
Jesse Duffield 1c89398288 Add GitHub commands and model for fetching PR status
Add GitHubCommands struct with GraphQL-based PR fetching, and
GithubPullRequest model. Wire HostingService and GitHub command
structs into GitCommand.

Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
2026-04-01 09:13:55 +02:00
Jesse Duffield 678a2a90cb Add cli/go-gh/v2 and cli/safeexec vendor dependencies
Required for authenticating with GitHub's API using the token
stored by the gh CLI.
2026-04-01 09:13:55 +02:00
Jesse Duffield 4cd72b09a2 Refactor hosting service to support repo name extraction
Extract parseRemoteUrl helper to avoid duplication between
getRepoURLFromRemoteURL and new getRepoNameFromRemoteURL.
Add repoNameTemplate to ServiceDefinition and GetRepoName() to
HostingServiceMgr. Add GetRepoInfoFromURL for callers that need
owner/repo without a full service lookup.
2026-03-31 15:48:28 +02:00
Stefan Haller 649679c33a Remove branch icons from Branches list
The only information that this carries is whether an entry is a real branch or a
detached head. Detached heads can only be at the top, and they are easy to tell
apart from the other branches by their name, so the icon is not really very
useful.

We are going to show PR icons in this column.
2026-03-31 15:48:28 +02:00
Stefan Haller 968c44b02f Add missing entries to scopeNameMap 2026-03-31 15:48:28 +02:00