From c4ad576b3973e7b152d23369ae808a0da4c96542 Mon Sep 17 00:00:00 2001 From: Daniel Sil Date: Thu, 1 Feb 2024 15:51:46 +0100 Subject: [PATCH] chore: update cronjobs with new gh actions In sequence of removing default assignee and reviewer --- .../workflows/cron-update-contributors.yml | 24 +++++++++---------- .github/workflows/cron-update-icons.yml | 24 +++++++++---------- .github/workflows/cron-update-statuses.yml | 23 +++++++++--------- .github/workflows/cron-update-tokens.yml | 24 +++++++++---------- 4 files changed, 44 insertions(+), 51 deletions(-) diff --git a/.github/workflows/cron-update-contributors.yml b/.github/workflows/cron-update-contributors.yml index fae28b0316..d1e1f79a36 100644 --- a/.github/workflows/cron-update-contributors.yml +++ b/.github/workflows/cron-update-contributors.yml @@ -31,17 +31,15 @@ jobs: FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }} - name: Create PR - uses: peter-evans/create-pull-request@v5 + uses: actions/github-script@v6 with: - base: master - branch: docs/update-contributors - token: ${{ secrets.PAT }} - delete-branch: true - title: "chore: update contributors" - labels: Documentation - body: | - - Automatically generated PR on ${{ env.TODAY }}. - - Updates contributors for docs - assignees: mainframev - reviewers: mainframev - draft: false + script: | + github.pulls.create({ + owner: context.repo.owner, + repo: context.repo.repo, + title: "chore: update contributors", + body: `- Automatically generated PR on ${process.env.TODAY}.\n- Updates contributors for docs`, + head: "docs/update-contributors", + base: "master", + maintainer_can_modify: true, + }); diff --git a/.github/workflows/cron-update-icons.yml b/.github/workflows/cron-update-icons.yml index 2fc37876b6..027ea8443f 100644 --- a/.github/workflows/cron-update-icons.yml +++ b/.github/workflows/cron-update-icons.yml @@ -31,17 +31,15 @@ jobs: FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }} - name: Create PR - uses: peter-evans/create-pull-request@v5 + uses: actions/github-script@v6 with: - base: master - branch: feat/update-icons-and-svgs - token: ${{ secrets.PAT }} - delete-branch: true - title: "feat(icons): update icons from Figma" - labels: Icons - body: | - - Automatically generated PR on ${{ env.TODAY }}. - - Updates icons from Figma - assignees: mainframev - reviewers: mainframev - draft: false + script: | + github.pulls.create({ + owner: context.repo.owner, + repo: context.repo.repo, + head: 'feat/update-icons-and-svgs', + base: 'master', + title: 'feat(icons): update icons from Figma', + body: `- Automatically generated PR on ${process.env.TODAY}.\n- Updates icons from Figma`, + maintainer_can_modify: true, + }); diff --git a/.github/workflows/cron-update-statuses.yml b/.github/workflows/cron-update-statuses.yml index cb2ff9bbbf..137ff1eb2c 100644 --- a/.github/workflows/cron-update-statuses.yml +++ b/.github/workflows/cron-update-statuses.yml @@ -29,16 +29,15 @@ jobs: git diff-index --quiet HEAD || git commit -m "chore: update component statuses" - name: Create PR - uses: peter-evans/create-pull-request@v5 + uses: actions/github-script@v6 with: - base: master - branch: chore/update-icons-and-svgs - token: ${{ secrets.PAT }} - delete-branch: true - title: "chore: update component statuses" - body: | - - Automatically generated PR on ${{ env.TODAY }}. - - Updates component statuses - assignees: mainframev - reviewers: mainframev - draft: false + script: | + github.pulls.create({ + owner: context.repo.owner, + repo: context.repo.repo, + head: 'chore/update-icons-and-svgs', + base: 'master', + title: 'chore: update component statuses', + body: `- Automatically generated PR on ${process.env.TODAY}.\n- Updates component statuses`, + maintainer_can_modify: true, + }); diff --git a/.github/workflows/cron-update-tokens.yml b/.github/workflows/cron-update-tokens.yml index 9c2ea6825b..546c9756fb 100644 --- a/.github/workflows/cron-update-tokens.yml +++ b/.github/workflows/cron-update-tokens.yml @@ -33,17 +33,15 @@ jobs: FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }} - name: Create PR - uses: peter-evans/create-pull-request@v5 + uses: actions/github-script@v6 with: - base: master - branch: feat/update-palette-tokens - token: ${{ secrets.PAT }} - delete-branch: true - title: "feat(tokens): update palette tokens from figma" - body: | - - Automatically generated PR on ${{ env.TODAY }}. - - Updates palette tokens from Figma - labels: Tokens - assignees: mainframev - reviewers: mainframev - draft: false + script: | + github.pulls.create({ + owner: context.repo.owner, + repo: context.repo.repo, + head: 'feat/update-palette-tokens', + base: 'master', + title: 'feat(tokens): update palette tokens from figma', + body: `- Automatically generated PR on ${process.env.TODAY }.\n- Updates palette tokens from Figma`, + maintainer_can_modify: true, + });