pr checks return distinct exit code for PENDING checks (#7866)

This commit is contained in:
Raj Hawaldar 2023-08-25 23:00:45 +05:30 committed by GitHub
parent 6f618b522c
commit 9fc571499f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 7 deletions

View file

@ -34,10 +34,11 @@ var updaterEnabled = ""
type exitCode int
const (
exitOK exitCode = 0
exitError exitCode = 1
exitCancel exitCode = 2
exitAuth exitCode = 4
exitOK exitCode = 0
exitError exitCode = 1
exitCancel exitCode = 2
exitAuth exitCode = 4
exitPending exitCode = 8
)
func main() {
@ -113,6 +114,8 @@ func mainRun() exitCode {
var authError *root.AuthError
if err == cmdutil.SilentError {
return exitError
} else if err == cmdutil.PendingError {
return exitPending
} else if cmdutil.IsUserCancellation(err) {
if errors.Is(err, terminal.InterruptErr) {
// ensure the next shell prompt will start on its own line