github2gerrit 2.1.0__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/.pre-commit-config.yaml +61 -9
  2. github2gerrit-2.2.0/LICENSES/Apache-2.0.txt +201 -0
  3. github2gerrit-2.2.0/PKG-INFO +463 -0
  4. github2gerrit-2.2.0/README.md +416 -0
  5. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/action.yaml +27 -2
  6. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/docs/cli.md +29 -1
  7. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/docs/features.md +124 -10
  8. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/pyproject.toml +80 -45
  9. github2gerrit-2.2.0/src/github2gerrit/approvers.py +296 -0
  10. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/cli.py +349 -46
  11. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/config.py +135 -8
  12. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/core.py +17 -14
  13. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/duplicate_detection.py +17 -5
  14. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/gitutils.py +1 -1
  15. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/models.py +40 -7
  16. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/pr_approval.py +35 -6
  17. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/pr_commands.py +113 -5
  18. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/ssh_config_parser.py +36 -60
  19. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/utils.py +10 -4
  20. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/conftest.py +29 -0
  21. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/fixtures/make_repo.py +3 -10
  22. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_action_environment_mapping.py +30 -0
  23. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_action_outputs.py +3 -0
  24. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_action_step_validation.py +650 -0
  25. github2gerrit-2.2.0/tests/test_approver_sources.py +433 -0
  26. github2gerrit-2.2.0/tests/test_cache_isolation.py +159 -0
  27. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_cli.py +9 -17
  28. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_cli_helpers.py +140 -0
  29. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_composite_action_coverage.py +42 -7
  30. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_config_helpers.py +381 -0
  31. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_core_integration_fixture_repo.py +1 -1
  32. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_core_prepare_commits.py +1 -1
  33. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_core_ssh_setup.py +5 -5
  34. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_duplicate_detection.py +456 -0
  35. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_error_codes.py +21 -10
  36. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_fork_approval_gate.py +352 -8
  37. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_fork_pr_hardening.py +95 -1
  38. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_gerrit_change_id_footer.py +1 -1
  39. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_gerrit_pr_closer.py +1 -0
  40. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_gerrit_ssh_abandon.py +2 -3
  41. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_gerrit_urls_more.py +7 -14
  42. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_mapping_comment_additional.py +59 -32
  43. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_mapping_comment_digest_and_backref.py +3 -4
  44. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_misc_small_coverage.py +1 -1
  45. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_orphan_rest_side_effects.py +11 -10
  46. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_pr_commands.py +2 -2
  47. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_pr_content_filter_integration.py +1 -1
  48. github2gerrit-2.2.0/tests/test_precommit_mypy_pins.py +338 -0
  49. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_reconciliation_extracted_module.py +42 -24
  50. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_reconciliation_plan_and_orphans.py +46 -26
  51. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_ssh_agent_ownership.py +39 -9
  52. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_ssh_artifact_prevention.py +10 -0
  53. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_utils.py +27 -1
  54. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/unit/test_config_integration.py +6 -19
  55. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/unit/test_ssh_config_parser.py +159 -72
  56. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/uv.lock +96 -86
  57. github2gerrit-2.1.0/LICENSE +0 -1
  58. github2gerrit-2.1.0/PKG-INFO +0 -394
  59. github2gerrit-2.1.0/README.md +0 -348
  60. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/.aislop/config.yml +0 -0
  61. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/.editorconfig +0 -0
  62. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/.gitignore +0 -0
  63. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/.gitlint +0 -0
  64. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/.markdownlint.yaml +0 -0
  65. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/.yamllint +0 -0
  66. /github2gerrit-2.1.0/LICENSES/Apache-2.0.txt → /github2gerrit-2.2.0/LICENSE +0 -0
  67. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/REUSE.toml +0 -0
  68. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/SECURITY.md +0 -0
  69. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/docs/COMMIT_RULES.md +0 -0
  70. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/docs/development.md +0 -0
  71. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/docs/github2gerrit_token_permissions_classic.png +0 -0
  72. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/sitecustomize.py +0 -0
  73. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/__init__.py +0 -0
  74. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/commit_normalization.py +0 -0
  75. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/commit_rules.py +0 -0
  76. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/constants.py +0 -0
  77. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/error_codes.py +0 -0
  78. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/external_api.py +0 -0
  79. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/gerrit_pr_closer.py +0 -0
  80. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/gerrit_query.py +0 -0
  81. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/gerrit_rest.py +0 -0
  82. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/gerrit_ssh.py +0 -0
  83. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/gerrit_urls.py +0 -0
  84. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/github_api.py +0 -0
  85. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/gitreview.py +0 -0
  86. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/mapping_comment.py +0 -0
  87. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/netrc.py +0 -0
  88. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/orchestrator/__init__.py +0 -0
  89. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/orchestrator/reconciliation.py +0 -0
  90. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/pr_content_filter.py +0 -0
  91. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/pr_directives.py +0 -0
  92. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/reconcile_matcher.py +0 -0
  93. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/rich_display.py +0 -0
  94. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/rich_logging.py +0 -0
  95. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/similarity.py +0 -0
  96. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/ssh_agent_setup.py +0 -0
  97. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/ssh_common.py +0 -0
  98. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/ssh_discovery.py +0 -0
  99. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/trailers.py +0 -0
  100. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/src/github2gerrit/trust.py +0 -0
  101. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/fixtures/__init__.py +0 -0
  102. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/fixtures/ssh_config_samples.py +0 -0
  103. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_action_pr_number_handling.py +0 -0
  104. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_automation_only.py +0 -0
  105. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_change_id_deduplication.py +0 -0
  106. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_clean_squash_title.py +0 -0
  107. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_cli_netrc_options.py +0 -0
  108. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_cli_outputs_file.py +0 -0
  109. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_cli_url_and_dryrun.py +0 -0
  110. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_commit_normalization.py +0 -0
  111. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_commit_rules.py +0 -0
  112. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_config_and_reviewers.py +0 -0
  113. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_core_close_pr_policy.py +0 -0
  114. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_core_config_and_errors.py +0 -0
  115. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_core_gerrit_backref_comment.py +0 -0
  116. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_core_gerrit_push_errors.py +0 -0
  117. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_core_gerrit_rest_results.py +0 -0
  118. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_core_shallow_clone.py +0 -0
  119. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_core_ssrf_protection.py +0 -0
  120. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_dependency_supersession.py +0 -0
  121. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_dns_validation_and_no_gerrit.py +0 -0
  122. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_email_case_normalization.py +0 -0
  123. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_external_api_framework.py +0 -0
  124. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_final_state_reconciliation.py +0 -0
  125. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_force_flag_cli.py +0 -0
  126. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_gerrit_change_status_checks.py +0 -0
  127. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_gerrit_rest_client.py +0 -0
  128. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_gerrit_urls.py +0 -0
  129. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_ghe_and_gitreview_args.py +0 -0
  130. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_github_api_error_handling.py +0 -0
  131. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_github_api_helpers.py +0 -0
  132. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_github_api_retry_and_helpers.py +0 -0
  133. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_gitreview.py +0 -0
  134. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_gitutils_helpers.py +0 -0
  135. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_issue_157_regressions.py +0 -0
  136. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_metadata_and_reconciliation.py +0 -0
  137. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_metadata_trailer_separation_bug.py +0 -0
  138. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_netrc.py +0 -0
  139. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_pr_command_authorisation.py +0 -0
  140. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_pr_content_filter.py +0 -0
  141. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_pr_update_detection.py +0 -0
  142. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_reconciliation_scenarios.py +0 -0
  143. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_ssh_agent.py +0 -0
  144. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_ssh_common.py +0 -0
  145. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_ssh_discovery.py +0 -0
  146. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_ssh_discovery_dry_run.py +0 -0
  147. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_trailers_additional.py +0 -0
  148. {github2gerrit-2.1.0 → github2gerrit-2.2.0}/tests/test_url_parser.py +0 -0
@@ -64,22 +64,72 @@ repos:
64
64
  types: [yaml]
65
65
 
66
66
  - repo: https://github.com/astral-sh/ruff-pre-commit
67
- rev: aab412d509121cb5f7533134b7e67f9fab59c682 # frozen: v0.16.4
67
+ rev: e8f7d69b957a30acb2c875078d5fd012de24b64c # frozen: v0.16.7
68
68
  hooks:
69
69
  - id: ruff
70
- files: ^(src|scripts|tests)/.+\.py$
70
+ files: ^(src|scripts|tests)/.+\.py$|^sitecustomize\.py$
71
71
  args: [--fix, --exit-non-zero-on-fix]
72
72
  - id: ruff-format
73
- files: ^(src|scripts|tests)/.+\.py$
73
+ files: ^(src|scripts|tests)/.+\.py$|^sitecustomize\.py$
74
74
 
75
75
  - repo: https://github.com/pre-commit/mirrors-mypy
76
76
  rev: 7ff8d35ae36a7d2b968f2f90b4c723e292e594ee # frozen: v2.3.1
77
77
  hooks:
78
78
  - id: mypy
79
- files: ^src/.+\.py$
79
+ # Every Python path in the repository, matching the ruff and
80
+ # basedpyright hooks above and below so the three cannot drift.
81
+ files: ^(src|scripts|tests)/.+\.py$|^sitecustomize\.py$
82
+ # mypy runs in an isolated virtualenv that holds only what is
83
+ # listed here, so anything the checked files import has to be
84
+ # present or mypy draws conclusions the project never would. With
85
+ # pytest absent, for instance, @pytest.fixture reads as an untyped
86
+ # decorator and pytest.raises stops telling mypy the block can
87
+ # swallow the exception, which turns every statement after a
88
+ # `with pytest.raises(...)` into dead code. Installing the real
89
+ # packages removes that whole class of environment-only findings;
90
+ # keep this list in step with the imports under src/ and tests/.
91
+ # pygerrit2 is deliberately absent: it is an optional runtime
92
+ # dependency and pyproject.toml already gives it
93
+ # ignore_missing_imports.
94
+ #
95
+ # The pins below are exact (==) rather than floors. This
96
+ # environment is resolved from PyPI at install time, not from
97
+ # uv.lock, so a >= constraint would still pick up whatever is
98
+ # newest whenever pre-commit.ci happens to rebuild the
99
+ # environment, and the hook would then report on a dependency set
100
+ # nobody runs locally. That drift is not theoretical: CI once
101
+ # resolved typer 0.27.2 against a lockfile holding 0.27.1, and the
102
+ # two disagreed about which module typer.Exit lives in.
103
+ # Every version here must equal the one uv.lock records for that
104
+ # package, so update both together (after `uv lock --upgrade`, for
105
+ # instance). tests/test_precommit_mypy_pins.py compares the two
106
+ # files and fails if they diverge in either direction.
107
+ #
108
+ # These pins do not freeze the whole resolved closure: pip still
109
+ # picks transitive versions at build time, and listing every
110
+ # package uv.lock records would duplicate the lockfile here. They
111
+ # do not need to. mypy's verdict can only turn on a package whose
112
+ # types it reads, which means one the checked files import, so the
113
+ # list covers exactly that set -- rich is here because src/ imports
114
+ # it, not because typer happens to pull it in. The same test asserts
115
+ # the list stays complete against those imports.
116
+ #
117
+ # mypy itself is pinned here as well as coming from the mirror's
118
+ # rev above. That is not redundant: the rev decides which mypy
119
+ # runs, and nothing otherwise ties it to the locked one, so an
120
+ # autoupdate of the mirror or a lockfile-only mypy upgrade would
121
+ # leave the hook running a different checker in silence. With the
122
+ # pin present, the test compares it against uv.lock, and a mirror
123
+ # whose rev disagrees fails to install rather than quietly winning.
80
124
  additional_dependencies:
81
- - types-PyYAML
82
- - types-requests
125
+ - mypy==2.3.1
126
+ - click==8.5.0
127
+ - pytest==9.1.1
128
+ - responses==0.26.3
129
+ - rich==15.0.0
130
+ - typer==0.27.2
131
+ - types-PyYAML==6.0.12.20260906
132
+ - types-requests==2.33.0.20260906
83
133
 
84
134
  - repo: https://github.com/btford/write-good
85
135
  rev: ab66ce10136dfad5146e69e70f82a3efac8842c1 # frozen: v1.0.8
@@ -120,13 +170,15 @@ repos:
120
170
 
121
171
  # Requires a mirror, primary repo lacks .pre-commit-hooks.yaml
122
172
  - repo: https://github.com/DetachHead/basedpyright-prek-mirror
123
- rev: 3c94d276aa3005fa1f5a977946c9dc106135c083 # frozen: 1.39.10
173
+ rev: 706e6acebe9e88c2c28d1527d3085a14b11794c4 # frozen: 1.40.1
124
174
  hooks:
125
175
  - id: basedpyright
126
- files: ^src/.+\.py$
176
+ # Every Python path in the repository. Keep in sync with the
177
+ # `include` list under [tool.pyright] in pyproject.toml.
178
+ files: ^(src|scripts|tests)/.+\.py$|^sitecustomize\.py$
127
179
 
128
180
  - repo: https://github.com/lfreleng-actions/gha-workflow-linter
129
- rev: 42aa4db931ab4c9da0930ae5ca2259ab08da79cb # frozen: v1.5.2
181
+ rev: 445a55d2a15b12217828eecf8d4bf7741e0e1360 # frozen: v1.5.6
130
182
  hooks:
131
183
  - id: gha-workflow-linter
132
184
 
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.