-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Status checks for each pull request (#59)
### Summary In this PR, the status check reports have been added to be visible on each pull request. There are a few things to note: - The checks may not be completely accurate if the repository is configured with external 3rd party tools for adding checks on a pull request - The checks icon will show the overall status of success, failed, pending, or if there aren't any configured - At the moment the performance has taken a hit because the query for the API has become more complicated, this will be addressed before this feature is available for users ### Changes - Updated query to fetch status checks information - Parallelized the query to split up the complexity of the query over multiple calls - Added new components to render icons next to the author on the pull request and clicking on them will navigate to the checks for the pull request
- Loading branch information
Showing
4 changed files
with
219 additions
and
47 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
51 changes: 51 additions & 0 deletions
51
src/popup/components/PRDisplay/RepoSection/PullRequest/StatusCheckIcons.tsx
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,51 @@ | ||
import React from "react"; | ||
import CircleIcon from "@mui/icons-material/Circle"; | ||
import ClearIcon from "@mui/icons-material/Clear"; | ||
import DoneIcon from "@mui/icons-material/Done"; | ||
import Tooltip from "@mui/material/Tooltip"; | ||
|
||
export function PendingStatusChecksIcon() { | ||
return ( | ||
<Tooltip | ||
title="Checks are still in rrogress" | ||
placement="top" | ||
disableInteractive | ||
> | ||
<CircleIcon | ||
sx={{ | ||
color: "#DCAB08", | ||
fontSize: "10px", | ||
cursor: "pointer", | ||
}} | ||
/> | ||
</Tooltip> | ||
); | ||
} | ||
|
||
export function SuccessStatusChecksIcon() { | ||
return ( | ||
<Tooltip title="All checks passed" placement="top" disableInteractive> | ||
<DoneIcon | ||
sx={{ | ||
color: "#1f883d", | ||
fontSize: "16px", | ||
cursor: "pointer", | ||
}} | ||
/> | ||
</Tooltip> | ||
); | ||
} | ||
|
||
export function FailedStatusChecksIcon() { | ||
return ( | ||
<Tooltip title="Checks have failed" placement="top" disableInteractive> | ||
<ClearIcon | ||
sx={{ | ||
color: "red", | ||
fontSize: "16px", | ||
cursor: "pointer", | ||
}} | ||
/> | ||
</Tooltip> | ||
); | ||
} |
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