Skip to content

fetchTree/github:: add merge argument #11160

Open
@roberth

Description

Is your feature request related to a problem? Please describe.

It's often useful to build or run something from a PR, especially when reviewing.
Let's make this easier.

Describe the solution you'd like

Step 1: CLI only

GitHub already supports a magic ref, like github:NixOS/nix?ref=refs/pull/11159/merge
We could provide a shorthand for this, like github:NixOS/nix?merge=11159

These merge commits, as well as commits in the PR tend to disappear, so it's doesn't make sense to lock this by rev sha.

Print a little notice when the PR has been merged, to let the user remove the merge parameter.

Step 2: Locking

Store the diff in the lock file or a location relative to it.
This would make it viable for use in pure-eval mode and real locking.

Step 3: Multiple

Multiple PRs could be merged in a single fetching. GitHub doesn't do this for us, so this would need the logic of Step 2, which needs to implement its own patching anyway.

Describe alternatives you've considered

Additional context

Priorities

Add 👍 to issues you find important.

Metadata

Assignees

No one assigned

    Labels

    UXThe way in which users interact with Nix. Higher level than UI.featureFeature request or proposalfetchingNetworking with the outside (non-Nix) world, input lockingnew-cliRelating to the "nix" command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions