mirror of
https://github.com/desktop/desktop
synced 2024-09-19 16:12:20 +00:00
Remove unused commitMessage and commitSHA props
We believe these weren't needed due to a redesign Co-Authored-By: Sergio Padrino <1083228+sergiou87@users.noreply.github.com>
This commit is contained in:
parent
4897f2fc49
commit
eb0f39cfe7
|
@ -7437,8 +7437,6 @@ export class AppStore extends TypedBaseStore<IAppState> {
|
|||
public onChecksFailedNotification = async (
|
||||
repository: RepositoryWithGitHubRepository,
|
||||
pullRequest: PullRequest,
|
||||
commitMessage: string,
|
||||
commitSha: string,
|
||||
checks: ReadonlyArray<IRefCheck>
|
||||
) => {
|
||||
const selectedRepository =
|
||||
|
@ -7449,8 +7447,6 @@ export class AppStore extends TypedBaseStore<IAppState> {
|
|||
pullRequest,
|
||||
repository,
|
||||
shouldChangeRepository: true,
|
||||
commitMessage,
|
||||
commitSha,
|
||||
checks,
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import { PullRequest, getPullRequestCommitRef } from '../../models/pull-request'
|
|||
import { RepositoryWithGitHubRepository } from '../../models/repository'
|
||||
import { Dispatcher, defaultErrorHandler } from '../../ui/dispatcher'
|
||||
import { API, APICheckConclusion, IAPIComment } from '../api'
|
||||
import { getCommit } from '../git'
|
||||
import { showNotification } from '../notifications/show-notification'
|
||||
import {
|
||||
isValidNotificationPullRequestReview,
|
||||
|
@ -226,8 +225,6 @@ export class NotificationsDebugStore {
|
|||
commit_sha: commitSha,
|
||||
}
|
||||
|
||||
const commit = await getCommit(repository, commitSha)
|
||||
|
||||
const numberOfFailedChecks = checks.filter(
|
||||
check => check.conclusion === APICheckConclusion.Failure
|
||||
).length
|
||||
|
@ -239,13 +236,7 @@ export class NotificationsDebugStore {
|
|||
const title = 'Pull Request checks failed'
|
||||
const body = `${pullRequest.title} #${pullRequest.pullRequestNumber} (${shortSHA})\n${numberOfFailedChecks} ${pluralChecks} not successful.`
|
||||
const onClick = () => {
|
||||
dispatcher.onChecksFailedNotification(
|
||||
repository,
|
||||
pullRequest,
|
||||
commit?.summary ?? 'Could not load commit summary',
|
||||
commitSha,
|
||||
checks
|
||||
)
|
||||
dispatcher.onChecksFailedNotification(repository, pullRequest, checks)
|
||||
}
|
||||
|
||||
showNotification({
|
||||
|
|
|
@ -41,8 +41,6 @@ import { NotificationCallback } from 'desktop-notifications/dist/notification-ca
|
|||
export type OnChecksFailedCallback = (
|
||||
repository: RepositoryWithGitHubRepository,
|
||||
pullRequest: PullRequest,
|
||||
commitMessage: string,
|
||||
commitSha: string,
|
||||
checkRuns: ReadonlyArray<IRefCheck>
|
||||
) => void
|
||||
|
||||
|
@ -403,13 +401,7 @@ export class NotificationsStore {
|
|||
const onClick = () => {
|
||||
this.statsStore.increment('checksFailedNotificationClicked')
|
||||
|
||||
this.onChecksFailedCallback?.(
|
||||
repository,
|
||||
pullRequest,
|
||||
commit.summary,
|
||||
commitSHA,
|
||||
checks
|
||||
)
|
||||
this.onChecksFailedCallback?.(repository, pullRequest, checks)
|
||||
}
|
||||
|
||||
if (skipNotification) {
|
||||
|
|
|
@ -351,8 +351,6 @@ export type PopupDetail =
|
|||
repository: RepositoryWithGitHubRepository
|
||||
pullRequest: PullRequest
|
||||
shouldChangeRepository: boolean
|
||||
commitMessage: string
|
||||
commitSha: string
|
||||
checks: ReadonlyArray<IRefCheck>
|
||||
}
|
||||
| {
|
||||
|
|
|
@ -2344,8 +2344,6 @@ export class App extends React.Component<IAppProps, IAppState> {
|
|||
shouldChangeRepository={popup.shouldChangeRepository}
|
||||
repository={popup.repository}
|
||||
pullRequest={popup.pullRequest}
|
||||
commitMessage={popup.commitMessage}
|
||||
commitSha={popup.commitSha}
|
||||
checks={popup.checks}
|
||||
accounts={this.state.accounts}
|
||||
onSubmit={onPopupDismissedFn}
|
||||
|
|
|
@ -3923,16 +3923,8 @@ export class Dispatcher {
|
|||
public onChecksFailedNotification(
|
||||
repository: RepositoryWithGitHubRepository,
|
||||
pullRequest: PullRequest,
|
||||
commitMessage: string,
|
||||
commitSha: string,
|
||||
checks: ReadonlyArray<IRefCheck>
|
||||
) {
|
||||
this.appStore.onChecksFailedNotification(
|
||||
repository,
|
||||
pullRequest,
|
||||
commitMessage,
|
||||
commitSha,
|
||||
checks
|
||||
)
|
||||
this.appStore.onChecksFailedNotification(repository, pullRequest, checks)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,8 +36,6 @@ interface IPullRequestChecksFailedProps {
|
|||
readonly accounts: ReadonlyArray<Account>
|
||||
readonly repository: RepositoryWithGitHubRepository
|
||||
readonly pullRequest: PullRequest
|
||||
readonly commitMessage: string
|
||||
readonly commitSha: string
|
||||
readonly checks: ReadonlyArray<IRefCheck>
|
||||
readonly onSubmit: () => void
|
||||
readonly onDismissed: () => void
|
||||
|
|
Loading…
Reference in a new issue