From cc9f58afee5d939389329e2f40ff1345e5f86022 Mon Sep 17 00:00:00 2001 From: vilmibm Date: Mon, 2 Mar 2020 16:04:47 -0600 Subject: [PATCH 1/4] upon release move Pending Release project cards into Done column --- .github/workflows/releases.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index f241dc1d9..6cfa339c6 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -26,6 +26,22 @@ jobs: args: release --release-notes=CHANGELOG.md env: GITHUB_TOKEN: ${{secrets.UPLOAD_GITHUB_TOKEN}} + cards: + needs: goreleaser + runs-on: ubuntu-latest + if: ${!contains(github.ref, "-")} + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + HUB: 'bin/hub api -HACCEPT:application/vnd.github.inertia-preview+json ' + PENDING_COLUMN: 8189733 + DONE_COLUMN: 7110130 + steps: + - name: move cards + shell: bash + run: | + curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1 + cards=$($HUB projects/columns/$PENDING_COLUMN/cards | jq "map(.id)|.[]") + for card in $cards; do $HUB projects/columns/cards/$card/moves --field position=top --field column_id=$DONE_COLUMN; done msi: needs: goreleaser runs-on: windows-latest From 11424e0ed09ce8e0d98a3e728584ce3f9efd2581 Mon Sep 17 00:00:00 2001 From: vilmibm Date: Tue, 3 Mar 2020 15:46:32 -0600 Subject: [PATCH 2/4] step not job --- .github/workflows/releases.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 6cfa339c6..009fc0b1e 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -26,17 +26,13 @@ jobs: args: release --release-notes=CHANGELOG.md env: GITHUB_TOKEN: ${{secrets.UPLOAD_GITHUB_TOKEN}} - cards: - needs: goreleaser - runs-on: ubuntu-latest - if: ${!contains(github.ref, "-")} - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - HUB: 'bin/hub api -HACCEPT:application/vnd.github.inertia-preview+json ' - PENDING_COLUMN: 8189733 - DONE_COLUMN: 7110130 - steps: - name: move cards + if: ${!contains(github.ref, "-")} + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + HUB: 'bin/hub api -HACCEPT:application/vnd.github.inertia-preview+json ' + PENDING_COLUMN: 8189733 + DONE_COLUMN: 7110130 shell: bash run: | curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1 From 17e690e093c1c70af1d3dfc1f5a5550010317b09 Mon Sep 17 00:00:00 2001 From: vilmibm Date: Tue, 3 Mar 2020 15:48:31 -0600 Subject: [PATCH 3/4] hopefully fix if --- .github/workflows/releases.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 009fc0b1e..fa8da81c1 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -27,7 +27,7 @@ jobs: env: GITHUB_TOKEN: ${{secrets.UPLOAD_GITHUB_TOKEN}} - name: move cards - if: ${!contains(github.ref, "-")} + if: "!contains(github.ref, '-')" env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} HUB: 'bin/hub api -HACCEPT:application/vnd.github.inertia-preview+json ' From 26c799e2ea48778df1882263b447d30ac401f9e0 Mon Sep 17 00:00:00 2001 From: vilmibm Date: Tue, 3 Mar 2020 15:52:26 -0600 Subject: [PATCH 4/4] use function not env var --- .github/workflows/releases.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index fa8da81c1..e94b6a26c 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -30,14 +30,14 @@ jobs: if: "!contains(github.ref, '-')" env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - HUB: 'bin/hub api -HACCEPT:application/vnd.github.inertia-preview+json ' PENDING_COLUMN: 8189733 DONE_COLUMN: 7110130 shell: bash run: | curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1 - cards=$($HUB projects/columns/$PENDING_COLUMN/cards | jq "map(.id)|.[]") - for card in $cards; do $HUB projects/columns/cards/$card/moves --field position=top --field column_id=$DONE_COLUMN; done + api() { bin/hub api -H 'accept: application/vnd.github.inertia-preview+json' "$@"; } + cards=$(api projects/columns/$PENDING_COLUMN/cards | jq ".[].id") + for card in $cards; do api projects/columns/cards/$card/moves --field position=top --field column_id=$DONE_COLUMN; done msi: needs: goreleaser runs-on: windows-latest