@@ -1874,7 +1874,7 @@ def fail_build(self, reason):
18741874 @defer .inlineCallbacks
18751875 def run (self ):
18761876 patch_id = self .getProperty ('patch_id' , '' )
1877- pr_number = self .getProperty ('github.number' , '' )
1877+ pr_number = self .getProperty ('github.number' , self . getProperty ( 'pr_number' , '' ) )
18781878 branch = self .getProperty ('github.base.ref' , DEFAULT_BRANCH )
18791879
18801880 if not any (candidate .match (branch ) for candidate in self .branches ):
@@ -1971,6 +1971,18 @@ def validate_github(self, pr_number):
19711971 pr_json = yield self .get_pr_json (pr_number , repository_url , retry = 3 )
19721972
19731973 if pr_json :
1974+ # Manually triggered from "Try build" button, manually populate data
1975+ if not self .getProperty ('github.number' , '' ):
1976+ self .setProperty ('github.base.ref' , pr_json ['base' ]['ref' ])
1977+ self .setProperty ('github.head.ref' , pr_json ['head' ]['ref' ])
1978+ self .setProperty ('github.head.repo.full_name' , pr_json ['head' ]['repo' ]['full_name' ])
1979+ self .setProperty ('github.head.sha' , pr_json ['head' ]['sha' ])
1980+ self .setProperty ('github.head.user.login' , pr_json ['head' ]['user' ]['login' ])
1981+ self .setProperty ('github.number' , pr_json ['number' ])
1982+ self .setProperty ('github.title' , pr_json ['title' ])
1983+ self .setProperty ('owners' , [pr_json ['head' ]['user' ]['login' ]])
1984+ yield ConfigureBuild .add_pr_details (self )
1985+
19741986 # Only track actionable labels, since bug category labels may reveal information about security bugs
19751987 self .setProperty ('github_labels' , [
19761988 data .get ('name' )
0 commit comments