Skip to content

Commit

Permalink
Change Github to GitHub (#23764)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbampton committed May 18, 2022
1 parent 2303750 commit 4a85370
Show file tree
Hide file tree
Showing 21 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions CI.rst
Expand Up @@ -66,7 +66,7 @@ we are utilising ``pull_request_target`` feature of GitHub Actions.

This feature allows to run a separate, independent workflow, when the main workflow is run -
this separate workflow is different than the main one, because by default it runs using ``main`` version
of the sources but also - and most of all - that it has WRITE access to the Github Container Image registry.
of the sources but also - and most of all - that it has WRITE access to the GitHub Container Image registry.

This is especially important in our case where Pull Requests to Airflow might come from any repository,
and it would be a huge security issue if anyone from outside could
Expand Down Expand Up @@ -495,7 +495,7 @@ until the images are built by the ``Build Images`` workflow before running.
Those "Build Image" steps are skipped in case Pull Requests do not come from "forks" (i.e. those
are internal PRs for Apache Airflow repository. This is because in case of PRs coming from
Apache Airflow (only committers can create those) the "pull_request" workflows have enough
permission to push images to Github Registry.
permission to push images to GitHub Registry.

This workflow is not triggered on normal pushes to our "main" branches, i.e. after a
pull request is merged and whenever ``scheduled`` run is triggered. Again in this case the "CI" workflow
Expand Down
10 changes: 5 additions & 5 deletions COMMITTERS.rst
Expand Up @@ -176,13 +176,13 @@ become active again you can simply email the PMC and ask to be reinstated.
The PMC also can mark committers as inactive after they have not been involved in the community for
more than 12 months.

Github configuration for committers
GitHub configuration for committers
-----------------------------------

To be able to merge PRs, committers have to integrate their Github ID with Apache systems. To do that follow steps:
To be able to merge PRs, committers have to integrate their GitHub ID with Apache systems. To do that follow steps:

1. Verify you have a Github ID `enabled with 2FA <https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/>`__.
2. Enter your Github ID into your `Apache ID profile <https://id.apache.org/>`__.
1. Verify you have a GitHub ID `enabled with 2FA <https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/>`__.
2. Enter your GitHub ID into your `Apache ID profile <https://id.apache.org/>`__.
3. Merge your Apache and GitHub accounts using `GitBox (Apache Account Linking utility) <https://gitbox.apache.org/setup/>`__. You should see 3 green checks in GitBox.
4. Wait at least 30 minutes for an email inviting you to Apache GitHub Organization and accept invitation.
5. After accepting the Github Invitation verify that you are a member of the `Airflow committers team on Github <https://github.com/orgs/apache/teams/airflow-committers>`__.
5. After accepting the GitHub Invitation verify that you are a member of the `Airflow committers team on GitHub <https://github.com/orgs/apache/teams/airflow-committers>`__.
2 changes: 1 addition & 1 deletion IMAGES.rst
Expand Up @@ -233,7 +233,7 @@ or
Naming conventions
==================

By default images we are using cache for images in Github Container registry. We are using GitHub
By default images we are using cache for images in GitHub Container registry. We are using GitHub
Container Registry as development image cache and CI registry for build images.
The images are all in organization wide "apache/" namespace. We are adding "airflow-" as prefix for
the image names of all Airflow images. The images are linked to the repository
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/github/example_dags/example_github.py
Expand Up @@ -59,7 +59,7 @@ def tag_checker(repo: Any, tag_name: str) -> Optional[bool]:
except GithubException as github_error: # type: ignore[misc]
raise AirflowException(f"Failed to execute GithubSensor, error: {str(github_error)}")
except Exception as e:
raise AirflowException(f"Github operator error: {str(e)}")
raise AirflowException(f"GitHub operator error: {str(e)}")
return result


Expand Down
6 changes: 3 additions & 3 deletions airflow/providers/github/hooks/github.py
Expand Up @@ -69,11 +69,11 @@ def get_ui_field_behaviour() -> Dict:
return {
"hidden_fields": ['schema', 'port', 'login', 'extra'],
"relabeling": {
'host': 'Github Enterprise Url (Optional)',
'password': 'Github Access Token',
'host': 'GitHub Enterprise Url (Optional)',
'password': 'GitHub Access Token',
},
"placeholders": {
'host': 'https://{hostname}/api/v3 (for Github Enterprise Connection)',
'host': 'https://{hostname}/api/v3 (for GitHub Enterprise Connection)',
'password': 'token credentials auth',
},
}
2 changes: 1 addition & 1 deletion airflow/providers/github/provider.yaml
Expand Up @@ -19,7 +19,7 @@
package-name: apache-airflow-providers-github
name: Github
description: |
`Github <https://www.github.com/>`__
`GitHub <https://www.github.com/>`__
versions:
- 1.0.3
- 1.0.2
Expand Down
6 changes: 3 additions & 3 deletions airflow/providers/github/sensors/github.py
Expand Up @@ -32,7 +32,7 @@ class GithubSensor(BaseSensorOperator):
"""
Base GithubSensor which can monitor for any change.
:param github_conn_id: reference to a pre-defined Github Connection
:param github_conn_id: reference to a pre-defined GitHub Connection
:param method_name: method name from PyGithub to be executed
:param method_params: parameters for the method method_name
:param result_processor: function that return boolean and act as a sensor response
Expand Down Expand Up @@ -102,7 +102,7 @@ class GithubTagSensor(BaseGithubRepositorySensor):
"""
Monitors a github tag for its creation.
:param github_conn_id: reference to a pre-defined Github Connection
:param github_conn_id: reference to a pre-defined GitHub Connection
:param tag_name: name of the tag to be monitored
:param repository_name: fully qualified name of the repository to be monitored, ex. "apache/airflow"
"""
Expand Down Expand Up @@ -141,7 +141,7 @@ def tag_checker(self, repo: Any) -> Optional[bool]:
except GithubException as github_error: # type: ignore[misc]
raise AirflowException(f"Failed to execute GithubSensor, error: {str(github_error)}")
except Exception as e:
raise AirflowException(f"Github operator error: {str(e)}")
raise AirflowException(f"GitHub operator error: {str(e)}")

if result is True:
self.log.info("Tag %s exists in %s repository, Success.", self.tag_name, self.repository_name)
Expand Down
4 changes: 2 additions & 2 deletions dev/assign_cherry_picked_prs_with_milestone.py
Expand Up @@ -89,7 +89,7 @@ def cli():
required=True,
help=textwrap.dedent(
"""
Github token used to authenticate.
GitHub token used to authenticate.
You can set omit it if you have GITHUB_TOKEN env variable set
Can be generated with:
https://github.com/settings/tokens/new?description=Read%20Write%20isssues&scopes=repo"""
Expand Down Expand Up @@ -228,7 +228,7 @@ def get_changes(verbose: bool, previous_release: str, current_release: str) -> L


def update_milestone(r: Repository, pr: PullRequest, m: Milestone):
# PR in Github API does not have a way to update milestone. It should be opened as issue,
# PR in GitHub API does not have a way to update milestone. It should be opened as issue,
# and then it can be updated ¯\_(ツ)_/¯
r.get_issue(pr.number).edit(milestone=m)

Expand Down
Expand Up @@ -69,7 +69,7 @@ In November 2021, Outreachy sponsored two internship for two interns: @Bowrna an
the projects:

* Convert Airflow Local Development environment `Breeze` - from Bash-based to Python-based
* Rewrite Github Action workflows to Python
* Rewrite GitHub Action workflows to Python

With @potiuk, @eladkal and @xurror as mentors.

Expand Down
2 changes: 1 addition & 1 deletion dev/prepare_bulk_issues.py
Expand Up @@ -109,7 +109,7 @@ def render_template_string(
required=True,
help=textwrap.dedent(
"""
Github token used to authenticate.
GitHub token used to authenticate.
You can omit it if you have GITHUB_TOKEN env variable set
Can be generated with:
https://github.com/settings/tokens/new?description=Write%20issues&scopes=repo:status,public_repo"""
Expand Down
2 changes: 1 addition & 1 deletion dev/prepare_release_issue.py
Expand Up @@ -72,7 +72,7 @@ def cli():
required=True,
help=textwrap.dedent(
"""
Github token used to authenticate.
GitHub token used to authenticate.
You can set omit it if you have GITHUB_TOKEN env variable set
Can be generated with:
https://github.com/settings/tokens/new?description=Read%20sssues&scopes=repo:status"""
Expand Down
2 changes: 1 addition & 1 deletion dev/provider_packages/prepare_provider_packages.py
Expand Up @@ -1913,7 +1913,7 @@ def is_package_in_dist(dist_files: List[str], package: str) -> bool:
envvar='GITHUB_TOKEN',
help=textwrap.dedent(
"""
Github token used to authenticate.
GitHub token used to authenticate.
You can set omit it if you have GITHUB_TOKEN env variable set.
Can be generated with:
https://github.com/settings/tokens/new?description=Read%20sssues&scopes=repo:status"""
Expand Down
2 changes: 1 addition & 1 deletion dev/stats/calculate_statistics_provider_testing_issues.py
Expand Up @@ -57,7 +57,7 @@ def cli():
required=True,
help=textwrap.dedent(
"""
Github token used to authenticate.
GitHub token used to authenticate.
You can set omit it if you have GITHUB_TOKEN env variable set
Can be generated with:
https://github.com/settings/tokens/new?description=Read%20Write%20isssues&scopes=repo"""
Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow-providers-github/commits.rst
Expand Up @@ -20,7 +20,7 @@
Package apache-airflow-providers-github
------------------------------------------------------

`Github <https://www.github.com/>`__
`GitHub <https://www.github.com/>`__


This is detailed commit list of changes for versions provider package: ``github``.
Expand Down
6 changes: 3 additions & 3 deletions docs/apache-airflow-providers-github/connections/github.rst
Expand Up @@ -18,9 +18,9 @@
.. _howto/connection:github:

Github Connection
GitHub Connection
====================
The Github connection type provides connection to a Github or Github Enterprise.
The GitHub connection type provides connection to a GitHub or GitHub Enterprise.

Configuring the Connection
--------------------------
Expand All @@ -30,7 +30,7 @@ Access Token (required)
- GitHub Enterprise - Create token - https://docs.github.com/en/enterprise-cloud@latest/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token/

Host (optional)
Specify the Github Enterprise Url (as string) that can be used for Github Enterprise
Specify the GitHub Enterprise Url (as string) that can be used for GitHub Enterprise
connection.

The following Url should be in following format:
Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow-providers-github/index.rst
Expand Up @@ -73,7 +73,7 @@ Content
Package apache-airflow-providers-github
------------------------------------------------------

`Github <https://www.github.com/>`__
`GitHub <https://www.github.com/>`__


Release: 1.0.3
Expand Down
4 changes: 2 additions & 2 deletions docs/apache-airflow-providers-github/operators/index.rst
Expand Up @@ -21,7 +21,7 @@ Operators
=========

Use the :class:`~airflow.providers.github.operators.GithubOperator` to execute
Operations in a `Github <https://www.github.com/>`__.
Operations in a `GitHub <https://www.github.com/>`__.

You can build your own operator using :class:`~airflow.providers.github.operators.GithubOperator`
and passing **github_method** and **github_method_args** from top level `PyGithub <https://www.pygithub.readthedocs.io/>`__ methods.
Expand Down Expand Up @@ -54,7 +54,7 @@ an example of this is :class:`~airflow.providers.github.sensors.GithubTagSensor`


Use the :class:`~airflow.providers.github.sensors.GithubTagSensor` to wait for creation of
a Tag in `Github <https://www.github.com/>`__.
a Tag in `GitHub <https://www.github.com/>`__.

An example for tag **v1.0**:

Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow/extra-packages-ref.rst
Expand Up @@ -224,7 +224,7 @@ Those are extras that add dependencies needed for integration with other softwar
+---------------------+-----------------------------------------------------+-------------------------------------------+
| exasol | ``pip install 'apache-airflow[exasol]'`` | Exasol hooks and operators |
+---------------------+-----------------------------------------------------+-------------------------------------------+
| github | ``pip install 'apache-airflow[github]'`` | Github operators and hook |
| github | ``pip install 'apache-airflow[github]'`` | GitHub operators and hook |
+---------------------+-----------------------------------------------------+-------------------------------------------+
| influxdb | ``pip install 'apache-airflow[influxdb]'`` | Influxdb operators and hook |
+---------------------+-----------------------------------------------------+-------------------------------------------+
Expand Down
6 changes: 3 additions & 3 deletions docs/apache-airflow/security/webserver.rst
Expand Up @@ -133,9 +133,9 @@ the comments removed and configured in the ``$AIRFLOW_HOME/webserver_config.py``
For more details, please refer to
`Security section of FAB documentation <https://flask-appbuilder.readthedocs.io/en/latest/security.html>`_.

Example using team based Authorization with Github OAuth
Example using team based Authorization with GitHub OAuth
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
There are a few steps required in order to use team-based authorization with Github OAuth.
There are a few steps required in order to use team-based authorization with GitHub OAuth.

* configure OAuth through the FAB config in webserver_config.py
* create a custom security manager class and supply it to FAB in webserver_config.py
Expand Down Expand Up @@ -199,7 +199,7 @@ webserver_config.py itself if you wish.
def team_parser(team_payload: Dict[str, Any]) -> List[int]:
# Parse the team payload from Github however you want here.
# Parse the team payload from GitHub however you want here.
return [team["id"] for team in team_payload]
Expand Down
6 changes: 3 additions & 3 deletions docs/helm-chart/manage-dags-files.rst
Expand Up @@ -138,9 +138,9 @@ In this approach, Airflow will read the DAGs from a PVC which has ``ReadOnlyMany
--set dags.persistence.existingClaim=my-volume-claim \
--set dags.gitSync.enabled=false
Mounting DAGs from a private Github repo using Git-Sync sidecar
Mounting DAGs from a private GitHub repo using Git-Sync sidecar
---------------------------------------------------------------
Create a private repo on Github if you have not created one already.
Create a private repo on GitHub if you have not created one already.
Then create your ssh keys:
Expand Down Expand Up @@ -184,7 +184,7 @@ Finally, from the context of your Airflow Helm chart directory, you can install
helm upgrade --install airflow apache-airflow/airflow -f override-values.yaml
If you have done everything correctly, Git-Sync will pick up the changes you make to the DAGs
in your private Github repo.
in your private GitHub repo.
You should take this a step further and set ``dags.gitSync.knownHosts`` so you are not susceptible to man-in-the-middle
attacks. This process is documented in the :ref:`production guide <production-guide:knownhosts>`.
2 changes: 1 addition & 1 deletion scripts/ci/libraries/_parallel.sh
Expand Up @@ -248,7 +248,7 @@ function parallel::get_maximum_parallel_k8s_jobs() {
docker_engine_resources::get_available_cpus_in_docker
if [[ -n ${RUNS_ON=} && ${RUNS_ON} != *"self-hosted"* ]]; then
echo
echo "${COLOR_YELLOW}This is a Github Public runner - for now we are forcing max parallel K8S tests jobs to 1 for those${COLOR_RESET}"
echo "${COLOR_YELLOW}This is a GitHub Public runner - for now we are forcing max parallel K8S tests jobs to 1 for those${COLOR_RESET}"
echo
export MAX_PARALLEL_K8S_JOBS="1"
else
Expand Down

0 comments on commit 4a85370

Please sign in to comment.