-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'NixOS:master' into master
- Loading branch information
Showing
283 changed files
with
5,123 additions
and
3,422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/usr/bin/env bash | ||
# See ./README.md for docs | ||
|
||
set -euo pipefail | ||
|
||
log() { | ||
echo "$@" >&2 | ||
} | ||
|
||
if (( $# < 2 )); then | ||
log "Usage: $0 GITHUB_REPO PR_NUMBER" | ||
exit 99 | ||
fi | ||
repo=$1 | ||
prNumber=$2 | ||
|
||
# Retry the API query this many times | ||
retryCount=5 | ||
# Start with 5 seconds, but double every retry | ||
retryInterval=5 | ||
|
||
while true; do | ||
log "Checking whether the pull request can be merged" | ||
prInfo=$(gh api \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
"/repos/$repo/pulls/$prNumber") | ||
|
||
# Non-open PRs won't have their mergeability computed no matter what | ||
state=$(jq -r .state <<< "$prInfo") | ||
if [[ "$state" != open ]]; then | ||
log "PR is not open anymore" | ||
exit 1 | ||
fi | ||
|
||
mergeable=$(jq -r .mergeable <<< "$prInfo") | ||
if [[ "$mergeable" == "null" ]]; then | ||
if (( retryCount == 0 )); then | ||
log "Not retrying anymore. It's likely that GitHub is having internal issues: check https://www.githubstatus.com/" | ||
exit 3 | ||
else | ||
(( retryCount -= 1 )) || true | ||
|
||
# null indicates that GitHub is still computing whether it's mergeable | ||
# Wait a couple seconds before trying again | ||
log "GitHub is still computing whether this PR can be merged, waiting $retryInterval seconds before trying again ($retryCount retries left)" | ||
sleep "$retryInterval" | ||
|
||
(( retryInterval *= 2 )) || true | ||
fi | ||
else | ||
break | ||
fi | ||
done | ||
|
||
if [[ "$mergeable" == "true" ]]; then | ||
log "The PR can be merged" | ||
jq -r .merge_commit_sha <<< "$prInfo" | ||
else | ||
log "The PR has a merge conflict" | ||
exit 2 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -960,6 +960,12 @@ | |
githubId = 49609151; | ||
name = "Popa Ioan Alexandru"; | ||
}; | ||
alexandru0-dev = { | ||
email = "[email protected]"; | ||
github = "alexandru0-dev"; | ||
githubId = 45104896; | ||
name = "Alexandru Nechita"; | ||
}; | ||
alexarice = { | ||
email = "[email protected]"; | ||
github = "alexarice"; | ||
|
@@ -7669,6 +7675,12 @@ | |
githubId = 111183546; | ||
keys = [ { fingerprint = "58CE D4BE 6B10 149E DA80 A990 2F48 6356 A4CB 30F3"; } ]; | ||
}; | ||
genga898 = { | ||
email = "[email protected]"; | ||
github = "genga898"; | ||
githubId = 84174227; | ||
name = "Emmanuel Genga"; | ||
}; | ||
genofire = { | ||
name = "genofire"; | ||
email = "[email protected]"; | ||
|
@@ -18391,6 +18403,18 @@ | |
githubId = 1217934; | ||
name = "José Romildo Malaquias"; | ||
}; | ||
romner-set = { | ||
email = "[email protected]"; | ||
github = "romner-set"; | ||
githubId = 41077433; | ||
name = "romner-set"; | ||
keys = [ | ||
{ | ||
# uploaded to https://keys.openpgp.org | ||
fingerprint = "4B75 244B 0279 9598 FF3B C21F 95FC 58F1 8CFD FAB0"; | ||
} | ||
]; | ||
}; | ||
ronanmacf = { | ||
email = "[email protected]"; | ||
github = "RonanMacF"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.