Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Commit

Permalink
when syncing repo, only request selective testing if a project is an …
Browse files Browse the repository at this point in the history
…autobazel project

Reviewers: anupc

Reviewed By: anupc

Subscribers: anupc, kylec, wwu

Differential Revision: https://tails.corp.dropbox.com/D234145
  • Loading branch information
Naphat Sanguansin committed Oct 4, 2016
1 parent ce728ed commit bc8d599
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions changes/listeners/build_revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from flask import current_app
from changes.api.build_index import BuildIndexAPIView
from changes.lib import project_lib
from changes.models.project import (
Project, ProjectStatus, ProjectOptionsHelper)
from changes.models.revision import Revision
Expand Down Expand Up @@ -90,14 +91,14 @@ def run(self):
if not files_changed_should_trigger_project(files_changed, project, options[project.id], revision.sha):
self.logger.info('No changed files matched project trigger for project %s', project.slug)
continue
projects_to_build.append(project.slug)
projects_to_build.append(project)

for project_slug in projects_to_build:
for project in projects_to_build:
data = {
'sha': revision.sha,
'project': project_slug,
'project': project.slug,
'tag': 'commit',
'selective_testing': 'true',
'selective_testing': 'true' if project_lib.contains_active_autogenerated_plan(project) else 'false',
}
with current_app.test_request_context('/api/0/builds/', method='POST', data=data):
try:
Expand Down

0 comments on commit bc8d599

Please sign in to comment.