Skip to content

Add checks, reviews info to pr status#55

Merged
vilmibm merged 4 commits intomasterfrom
pr-status-checks
Nov 13, 2019
Merged

Add checks, reviews info to pr status#55
vilmibm merged 4 commits intomasterfrom
pr-status-checks

Conversation

@mislav
Copy link
Copy Markdown
Contributor

@mislav mislav commented Nov 8, 2019

Reapplies #45 to the master branch with bonus tweaks.

Ref. https://github.com/github/ce-cli/issues/18

Copy link
Copy Markdown
Contributor

@vilmibm vilmibm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! just curious about the use of panic

case "PENDING":
summary.Pending++
default:
panic(fmt.Errorf("unsupported status: %q", status.State))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why a panic, here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! Previously, this method didn't have error conditions, but then I added the switch statement and I think I covered all possible states, but just in case I didn't, or some new states get added, we get a panic with a stack trace rather than a silent failure.

We could totally return an error here; I just made a call (also, pressured for time) that all states were covered and that I don't expect this panic to actually get triggered in day-to-day use.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I get it! I think that's a fair use of a panic.

case "FAILURE", "CANCELLED", "TIMED_OUT", "ACTION_REQUIRED":
summary.Failing++
default:
panic(fmt.Errorf("unsupported check conclusion: %q", checkRun.Conclusion))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question

@vilmibm vilmibm merged commit dac818f into master Nov 13, 2019
@mislav mislav deleted the pr-status-checks branch November 14, 2019 17:11
Stonre pushed a commit to Stonre/strands-fork that referenced this pull request Jul 21, 2025
* Added hyphen to allowed characters in tool name validation
@kfcxzaq084

This comment was marked as spam.

1 similar comment
@kfcxzaq084

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants