You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/08/07 08:30:36 UTC

[airflow] branch master updated: You can sync your fork master with apache/airflow master via UI (#10209)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new 1dc8b78  You can sync your fork master with apache/airflow master via UI (#10209)
1dc8b78 is described below

commit 1dc8b78fd4648649cf5b36b257a92254e323a94a
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Fri Aug 7 10:29:31 2020 +0200

    You can sync your fork master with apache/airflow master via UI (#10209)
    
    We are using newly added feature of GitHub to add manually triggered
    workflow to enable manually-triggered force-syncing of your fork
    with apache/airflow.
---
 .github/workflows/repo_sync.yml | 17 +++++++++++++++++
 CONTRIBUTING.rst                | 17 ++++++++++++++++-
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/repo_sync.yml b/.github/workflows/repo_sync.yml
new file mode 100644
index 0000000..7a7e0b0
--- /dev/null
+++ b/.github/workflows/repo_sync.yml
@@ -0,0 +1,17 @@
+# File: .github/workflows/repo-sync.yml
+name: Force sync master from apache/airflow
+on:
+  workflow_dispatch:
+jobs:
+  repo-sync:
+    if: github.repository != 'apache/airflow'
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@master
+      - name: repo-sync
+        uses: repo-sync/github-sync@v2
+        with:
+          source_repo: "apache/airflow"
+          source_branch: "master"
+          destination_branch: "master"
+          github_token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 5486b53..b722d8e 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -194,6 +194,9 @@ Step 4: Prepare PR
    * Find the test class where you should add tests. For the example ticket,
      this is `test_email.py <https://github.com/apache/airflow/blob/master/tests/utils/test_email.py>`__.
 
+   * Make sure your fork's master is synced with Apache Airflow's master before you create a branch. See
+     `How to sync your fork <#how-to-sync-your-fork>`_ for details.
+
    * Create a local branch for your development. Make sure to use latest
      ``apache/master`` as base for the branch. See `How to Rebase PR <#how-to-rebase-pr>`_ for some details
      on setting up the ``apache`` remote. Note, some people develop their changes directly in their own
@@ -862,6 +865,19 @@ commands:
     # Check JS code in .js and .html files, report any errors/warnings and fix them if possible
     yarn run lint:fix
 
+How to sync your fork
+=====================
+
+When you have your fork, you should periodically synchronize the master of your fork with the
+Apache Airflow master. In order to do that you can ``git pull --rebase`` to your local git repository from
+apache remote and push the master (often with ``--force`` to your fork). There is also an easy
+way using ``Force sync master from apache/airflow`` workflow. You can go to "Actions" in your repository and
+choose the workflow and manually trigger the workflow using "Run workflow" command.
+
+This will force-push the master from apache/airflow to the master in your fork. Note that in case you
+modified the master in your fork, you might loose those changes.
+
+
 How to rebase PR
 ================
 
@@ -873,7 +889,6 @@ author of the change. It also produces a "single-line" series of commits in mast
 makes it much easier to understand what was going on and to find reasons for problems (it is especially
 useful for "bisecting" when looking for a commit that introduced some bugs.
 
-
 First of all - you can read about rebase workflow here:
 `Merging vs. rebasing <https://www.atlassian.com/git/tutorials/merging-vs-rebasing>`_ - this is an
 excellent article that describes all ins/outs of rebase. I recommend reading it and keeping it as reference.