@@ -2,9 +2,8 @@ import React from 'react';
2
2
import PropTypes from 'prop-types' ;
3
3
import { shell } from 'electron' ;
4
4
5
- import { autobind } from '../helpers' ;
6
5
import { incrementCounter } from '../reporter-proxy' ;
7
- import { RemotePropType , RemoteSetPropType , BranchSetPropType , EndpointPropType } from '../prop-types' ;
6
+ import { RemotePropType , RemoteSetPropType , BranchSetPropType , EndpointPropType , TokenPropType } from '../prop-types' ;
8
7
import IssueishSearchesController from './issueish-searches-controller' ;
9
8
10
9
export default class RemoteController extends React . Component {
@@ -20,7 +19,7 @@ export default class RemoteController extends React.Component {
20
19
21
20
// Connection
22
21
endpoint : EndpointPropType . isRequired ,
23
- token : PropTypes . string . isRequired ,
22
+ token : TokenPropType . isRequired ,
24
23
25
24
// Repository derived attributes
26
25
workingDirectory : PropTypes . string ,
@@ -35,11 +34,6 @@ export default class RemoteController extends React.Component {
35
34
onPushBranch : PropTypes . func . isRequired ,
36
35
}
37
36
38
- constructor ( props ) {
39
- super ( props ) ;
40
- autobind ( this , 'onCreatePr' ) ;
41
- }
42
-
43
37
render ( ) {
44
38
return (
45
39
< IssueishSearchesController
@@ -61,7 +55,7 @@ export default class RemoteController extends React.Component {
61
55
) ;
62
56
}
63
57
64
- async onCreatePr ( ) {
58
+ onCreatePr = async ( ) => {
65
59
const currentBranch = this . props . branches . getHeadBranch ( ) ;
66
60
const upstream = currentBranch . getUpstream ( ) ;
67
61
if ( ! upstream . isPresent ( ) || this . props . aheadCount > 0 ) {
0 commit comments