fix: prevent redundant requests for PR

This commit is contained in:
EnixCoda 2020-11-13 00:55:25 +08:00
parent 3323477b07
commit 72ebbb2047
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD

View file

@ -98,7 +98,8 @@ export const init: BoundMethodCreator = dispatch => async () => {
if (
!detectedBranchName &&
projectDefaultBranchName &&
projectDefaultBranchName !== metaData.branchName
projectDefaultBranchName !== metaData.branchName &&
metaData.type !== 'pull'
) {
// Accessing repository's non-homepage(no branch name in URL, nor in DOM)
// We predicted its default branch to be 'master' and sent aggressive request