Skip to content

Commit

Permalink
Merge pull request #241 from NixOS/fix-nixpkgs-diff-merging
Browse files Browse the repository at this point in the history
Run Nixpkgs diff on nixfmt commits merged into the base branch
  • Loading branch information
dasJ authored Aug 29, 2024
2 parents 8c4da7b + a78b63e commit 738abf3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/sync-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ bodyForCommitIndex() {
echo -e "base: $subject\n\nFormat using the base commit from nixfmt PR $nixfmtPrNumber: $url"
else
url=$nixfmtUrl/pull/$nixfmtPrNumber/commits/$commit
echo -e "$index: $subject\n\nFormat using commit number $index from nixfmt PR $nixfmtPrNumber: $url"
echo -e "$index: $subject\n\nFormat using commit number $index from nixfmt PR $nixfmtPrNumber: $url (merged into the base branch)"
fi
}

Expand Down Expand Up @@ -249,6 +249,8 @@ update() {

step "Checking out nixfmt at $nixfmtCommit"
git -C nixfmt checkout -q "$nixfmtCommit"
step "Merging with the base commit $nixfmtBaseCommit"
git -C nixfmt merge --no-stat --no-edit "$nixfmtBaseCommit"
}

# Format Nixpkgs with a specific nixfmt version and push the result.
Expand Down

0 comments on commit 738abf3

Please sign in to comment.