mirror of
https://github.com/harness/drone.git
synced 2025-05-30 19:23:07 +00:00
only check no fork logic if pull request
This commit is contained in:
parent
616433b709
commit
c36bf0d5ee
@ -78,13 +78,15 @@ func (t *triggerer) Trigger(ctx context.Context, repo *core.Repository, base *co
|
||||
logger.Infoln("trigger: skipping hook. found skip directive")
|
||||
return nil, nil
|
||||
}
|
||||
if repo.IgnorePulls && base.Event == core.EventPullRequest {
|
||||
logger.Infoln("trigger: skipping hook. project ignores pull requests")
|
||||
return nil, nil
|
||||
}
|
||||
if repo.IgnoreForks && !strings.EqualFold(base.Fork, repo.Slug) {
|
||||
logger.Infoln("trigger: skipping hook. project ignores forks")
|
||||
return nil, nil
|
||||
if base.Event == core.EventPullRequest {
|
||||
if repo.IgnorePulls {
|
||||
logger.Infoln("trigger: skipping hook. project ignores pull requests")
|
||||
return nil, nil
|
||||
}
|
||||
if repo.IgnoreForks && !strings.EqualFold(base.Fork, repo.Slug) {
|
||||
logger.Infoln("trigger: skipping hook. project ignores forks")
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
|
||||
user, err := t.users.Find(ctx, repo.UserID)
|
||||
|
Loading…
x
Reference in New Issue
Block a user