From ed84054889c7b80c33c140471917f4951323c9cf Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Mon, 21 Mar 2022 09:18:58 +0000 Subject: [PATCH 01/16] Add action --- .github/workflows/backmerge.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/backmerge.yml diff --git a/.github/workflows/backmerge.yml b/.github/workflows/backmerge.yml new file mode 100644 index 0000000..35268fd --- /dev/null +++ b/.github/workflows/backmerge.yml @@ -0,0 +1,25 @@ +name: Backmerge master --> staging + +on: + push: + branches: [ master ] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + backmerge: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Timestamp + run: date -u > latest-backmerge.txt + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + with: + # TODO: Reviewers + title: "Backmerge 'master' to 'staging'" + commit-message: "Backmerge 'master' to 'staging'" + base: "staging" \ No newline at end of file From 26a230c6bb5b27cf159699fc97d4cec7d6b1fd23 Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Mon, 21 Mar 2022 09:19:52 +0000 Subject: [PATCH 02/16] Update the README --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a48d4db..261aab4 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# testbed \ No newline at end of file +# testbed + +Update the README \ No newline at end of file From a89a29cd32687170702fcadf2008548382e6d557 Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Mon, 21 Mar 2022 09:29:28 +0000 Subject: [PATCH 03/16] Use gh cli --- .github/workflows/backmerge.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/backmerge.yml b/.github/workflows/backmerge.yml index 35268fd..d2b3907 100644 --- a/.github/workflows/backmerge.yml +++ b/.github/workflows/backmerge.yml @@ -12,14 +12,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - - name: Timestamp - run: date -u > latest-backmerge.txt - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 - with: - # TODO: Reviewers - title: "Backmerge 'master' to 'staging'" - commit-message: "Backmerge 'master' to 'staging'" - base: "staging" \ No newline at end of file + run: | + gh pr create --title="Backmerge" --body="" --base="staging" --head="master" \ No newline at end of file From ecd6be21977aa313695afecef208b397cccb9823 Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Mon, 21 Mar 2022 09:31:06 +0000 Subject: [PATCH 04/16] Add token --- .github/workflows/backmerge.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backmerge.yml b/.github/workflows/backmerge.yml index d2b3907..a46000e 100644 --- a/.github/workflows/backmerge.yml +++ b/.github/workflows/backmerge.yml @@ -15,4 +15,6 @@ jobs: - name: Create Pull Request run: | - gh pr create --title="Backmerge" --body="" --base="staging" --head="master" \ No newline at end of file + gh pr create --title="Backmerge" --body="" --base="staging" --head="master" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From a357e7eaccd479df34a7df7f53ff5a6be3a761ed Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Mon, 21 Mar 2022 09:32:15 +0000 Subject: [PATCH 05/16] Add the title --- .github/workflows/backmerge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backmerge.yml b/.github/workflows/backmerge.yml index a46000e..409a4db 100644 --- a/.github/workflows/backmerge.yml +++ b/.github/workflows/backmerge.yml @@ -15,6 +15,6 @@ jobs: - name: Create Pull Request run: | - gh pr create --title="Backmerge" --body="" --base="staging" --head="master" + gh pr create --title="Backmerge $(date -u)" --body="" --base="staging" --head="master" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3599eb4b7c9aa619d1e9f890c99a9491aee64bb1 Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Mon, 21 Mar 2022 09:43:56 +0000 Subject: [PATCH 06/16] Check for existing --- .github/workflows/backmerge.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backmerge.yml b/.github/workflows/backmerge.yml index 409a4db..084f383 100644 --- a/.github/workflows/backmerge.yml +++ b/.github/workflows/backmerge.yml @@ -12,9 +12,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + + - name: Check for Pull Request + id: check + run: | + PR_LIST=$(gh pr list --base="staging" --head="master" --state="open" --json="number) + echo $PR_LIST + echo "::set-output name=pr_list::$PR_LIST" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create Pull Request run: | - gh pr create --title="Backmerge $(date -u)" --body="" --base="staging" --head="master" + [ $LIST = "[]" ] && gh pr create --title="Backmerge $(date -u)" --body="" --base="staging" --head="master" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_LIST: ${{ steps.check.outputs.pr_list }} From 129dc4a1ad890eecccc3c622797907454c2fe0fc Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Mon, 21 Mar 2022 09:44:24 +0000 Subject: [PATCH 07/16] Missing quote --- .github/workflows/backmerge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backmerge.yml b/.github/workflows/backmerge.yml index 084f383..09df3f8 100644 --- a/.github/workflows/backmerge.yml +++ b/.github/workflows/backmerge.yml @@ -16,7 +16,7 @@ jobs: - name: Check for Pull Request id: check run: | - PR_LIST=$(gh pr list --base="staging" --head="master" --state="open" --json="number) + PR_LIST=$(gh pr list --base="staging" --head="master" --state="open" --json="number") echo $PR_LIST echo "::set-output name=pr_list::$PR_LIST" env: From f23d60d85f616cb266622ea8637a672686de1edc Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Mon, 21 Mar 2022 09:45:24 +0000 Subject: [PATCH 08/16] Fix variable --- .github/workflows/backmerge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backmerge.yml b/.github/workflows/backmerge.yml index 09df3f8..b8becf3 100644 --- a/.github/workflows/backmerge.yml +++ b/.github/workflows/backmerge.yml @@ -24,7 +24,7 @@ jobs: - name: Create Pull Request run: | - [ $LIST = "[]" ] && gh pr create --title="Backmerge $(date -u)" --body="" --base="staging" --head="master" + [ $PR_LIST = "[]" ] && gh pr create --title="Backmerge $(date -u)" --body="" --base="staging" --head="master" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR_LIST: ${{ steps.check.outputs.pr_list }} From 6176ee0dc168744f31e2da9e8b3e393b260d11cd Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Mon, 21 Mar 2022 09:47:38 +0000 Subject: [PATCH 09/16] If else --- .github/workflows/backmerge.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backmerge.yml b/.github/workflows/backmerge.yml index b8becf3..b724f95 100644 --- a/.github/workflows/backmerge.yml +++ b/.github/workflows/backmerge.yml @@ -1,4 +1,4 @@ -name: Backmerge master --> staging +name: Backmerge master to staging on: push: @@ -24,7 +24,12 @@ jobs: - name: Create Pull Request run: | - [ $PR_LIST = "[]" ] && gh pr create --title="Backmerge $(date -u)" --body="" --base="staging" --head="master" + if [ $PR_LIST = "[]" ] + then + gh pr create --title="Backmerge master to staging" --body="" --base="staging" --head="master" + else + echo "Open PR already exists" + fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR_LIST: ${{ steps.check.outputs.pr_list }} From 9194d9bc975122450f9bc64c8dd621e3c16e0c43 Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Mon, 21 Mar 2022 09:48:10 +0000 Subject: [PATCH 10/16] Readme update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 261aab4..09d64a5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # testbed -Update the README \ No newline at end of file +Update the README. Again. \ No newline at end of file From bc57fbec54c0f695f9c8ea46f710790c0731fd5e Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Wed, 11 May 2022 09:31:37 +0100 Subject: [PATCH 11/16] Create CODEOWNERS --- CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..1531de3 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,3 @@ +* @samatcolumn + +foo/ @hatboysam From 20b678a1fd09af08dcaec11d511b76160bc23d14 Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Wed, 11 May 2022 09:33:22 +0100 Subject: [PATCH 12/16] Add files --- bar/file.txt | 1 + foo/baz/file.txt | 1 + foo/file.txt | 1 + 3 files changed, 3 insertions(+) create mode 100644 bar/file.txt create mode 100644 foo/baz/file.txt create mode 100644 foo/file.txt diff --git a/bar/file.txt b/bar/file.txt new file mode 100644 index 0000000..52f2ed3 --- /dev/null +++ b/bar/file.txt @@ -0,0 +1 @@ +bar/file.txt \ No newline at end of file diff --git a/foo/baz/file.txt b/foo/baz/file.txt new file mode 100644 index 0000000..f29d9bb --- /dev/null +++ b/foo/baz/file.txt @@ -0,0 +1 @@ +foo/baz/file.txt \ No newline at end of file diff --git a/foo/file.txt b/foo/file.txt new file mode 100644 index 0000000..3f82f90 --- /dev/null +++ b/foo/file.txt @@ -0,0 +1 @@ +foo/file.txt \ No newline at end of file From 74d48197558bc7e7d855a9b66f69678a652a4194 Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Wed, 11 May 2022 09:34:14 +0100 Subject: [PATCH 13/16] Update CODEOWNERS --- CODEOWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index 1531de3..f4f3076 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,3 +1,6 @@ * @samatcolumn foo/ @hatboysam +foo/baz/ @hatboysam-test + +bar/ @hatboysam-test From cf2d0c97b6d83b2e9e971cfed447e60746bc6d6d Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Wed, 11 May 2022 09:35:11 +0100 Subject: [PATCH 14/16] Update CODEOWNERS --- CODEOWNERS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index f4f3076..8b26b69 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,6 +1,6 @@ -* @samatcolumn +README.md @samatcolumn -foo/ @hatboysam -foo/baz/ @hatboysam-test +foo/ @hatboysam +foo/baz/ @hatboysam-test -bar/ @hatboysam-test +bar/ @hatboysam-test From df4494845d95b9aa01904a407a5a1f37e52a5fa5 Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Wed, 11 May 2022 09:37:16 +0100 Subject: [PATCH 15/16] Update CODEOWNERS --- CODEOWNERS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 8b26b69..d28bb3a 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,6 +1,6 @@ -README.md @samatcolumn +/README.md @samatcolumn -foo/ @hatboysam -foo/baz/ @hatboysam-test +/foo/ @hatboysam +/foo/baz/ @hatboysam-test -bar/ @hatboysam-test +/bar/ @hatboysam-test From 5207c7da34e8f21e5a52f2ef17e4bc20f8ec2f75 Mon Sep 17 00:00:00 2001 From: Sam Stern <98708721+samatcolumn@users.noreply.github.com> Date: Mon, 12 Sep 2022 17:26:21 +0100 Subject: [PATCH 16/16] Changed named (#8) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09d64a5..db35a87 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# testbed +# testbed - apple Update the README. Again. \ No newline at end of file