Exemplo n.º 1
0
 def get_settings(token='token',
                  api_url='http://github.api.url/',
                  graphql_url='http://github.graphql.url/',
                  event={},
                  event_name='event name',
                  repo='repo',
                  commit='commit',
                  files_glob='files',
                  check_name='check name',
                  comment_title='title',
                  comment_on_pr=True,
                  test_changes_limit=10,
                  hide_comment_mode='off',
                  report_individual_runs=True,
                  dedup_classes_by_file_name=True,
                  check_run_annotation=[]):
     return Settings(token=token,
                     api_url=api_url,
                     graphql_url=graphql_url,
                     event=event.copy(),
                     event_name=event_name,
                     repo=repo,
                     commit=commit,
                     files_glob=files_glob,
                     check_name=check_name,
                     comment_title=comment_title,
                     comment_on_pr=comment_on_pr,
                     pull_request_build=pull_request_build_mode_merge,
                     test_changes_limit=test_changes_limit,
                     hide_comment_mode=hide_comment_mode,
                     report_individual_runs=report_individual_runs,
                     dedup_classes_by_file_name=dedup_classes_by_file_name,
                     check_run_annotation=check_run_annotation.copy())
 def get_settings(token='token',
                  api_url='http://github.api.url/',
                  graphql_url='http://github.graphql.url/',
                  retries=2,
                  event={},
                  event_name='event name',
                  repo='repo',
                  commit='commit',
                  fail_on_errors=True,
                  fail_on_failures=True,
                  files_glob='files',
                  check_name='check name',
                  comment_title='title',
                  comment_mode=comment_mode_create,
                  compare_earlier=True,
                  test_changes_limit=10,
                  hide_comment_mode='off',
                  report_individual_runs=True,
                  dedup_classes_by_file_name=True,
                  check_run_annotation=[],
                  seconds_between_github_reads=1.5,
                  seconds_between_github_writes=2.5):
     return Settings(
         token=token,
         api_url=api_url,
         graphql_url=graphql_url,
         api_retries=retries,
         event=event.copy(),
         event_name=event_name,
         repo=repo,
         commit=commit,
         fail_on_errors=fail_on_errors,
         fail_on_failures=fail_on_failures,
         files_glob=files_glob,
         check_name=check_name,
         comment_title=comment_title,
         comment_mode=comment_mode,
         compare_earlier=compare_earlier,
         pull_request_build=pull_request_build_mode_merge,
         test_changes_limit=test_changes_limit,
         hide_comment_mode=hide_comment_mode,
         report_individual_runs=report_individual_runs,
         dedup_classes_by_file_name=dedup_classes_by_file_name,
         check_run_annotation=check_run_annotation.copy(),
         seconds_between_github_reads=seconds_between_github_reads,
         seconds_between_github_writes=seconds_between_github_writes)