Merge pull request 'Abort watchpr when a poll can no longer see the PR' (#12) from benvin/watchpr-terminal-errors into main
ci/woodpecker/tag/release Pipeline was successful
ci/woodpecker/tag/release Pipeline was successful
Reviewed-on: #12
This commit was merged in pull request #12.
This commit is contained in:
@@ -140,6 +140,9 @@ func runWatch(c *agent.GiteaClient, refs []agent.PRRef, interval time.Duration,
|
||||
if agent.IsAuthError(err) {
|
||||
return fmt.Errorf("gitea authentication failed after re-minting the token, watch aborted: %w", err)
|
||||
}
|
||||
if agent.IsPRGone(err) {
|
||||
return fmt.Errorf("PR no longer visible (repo deleted, renamed, or made private), watch aborted: %w", err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
report(res.Ref.String(), res.Reason, res.State, jsonMode)
|
||||
|
||||
Reference in New Issue
Block a user