From e178d9abdb98f5f39dccec9e81e3dfaa88b8b78c Mon Sep 17 00:00:00 2001 From: Kevin Deldycke Date: Sun, 3 Mar 2024 16:08:34 +0400 Subject: [PATCH 1/2] Set token to the default provided by GitHub workflow --- README.md | 7 +++---- action.yml | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3ab5bf8..631f354 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,6 @@ jobs: - name: actions-template-sync uses: AndreasAugustin/actions-template-sync@v1 with: - github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: upstream_branch: # defaults to main pr_labels: ,[,...] # defaults to template_sync @@ -232,11 +231,11 @@ jobs: ### Action Inputs -| Variable | Description | Required | `[Default]` | +| Variable | Description | Required | Default | |-----------------------------|---------------------------------------------------------------------------------------------------------------|----------|-----------------------------------------------------------------------| -| github_token | Token for the repo. Can be passed in using `$\{{ secrets.GITHUB_TOKEN }}` | `true` | | +| github_token | Token for the repo. Can be passed in using `${{ secrets.GITHUB_TOKEN }}` | `true` | `${{ github.token }}` | | source_repo_path | Repository path of the template | `true` | | -| upstream_branch | The target branch | `false` | `` | +| upstream_branch | The target branch | `false` | The remote's default (usually `main`) | | source_repo_ssh_private_key | `[optional]` private ssh key for the source repository. [see](#private-template-repository) | `false` | | | pr_branch_name_prefix | `[optional]` the prefix of branches created by this action | `false` | `chore/template_sync` | | pr_title | `[optional]` the title of PRs opened by this action. Must be already created. | `false` | `upstream merge template repository` | diff --git a/action.yml b/action.yml index 9479443..8fc113e 100644 --- a/action.yml +++ b/action.yml @@ -8,6 +8,7 @@ inputs: github_token: description: 'Token for the repo. Can be passed in using $\{{ secrets.GITHUB_TOKEN }}' required: true + default: ${{ github.token }} source_repo_path: description: "Repository path of the template" required: true From 9fc51f716b48a6949c15e03d25ecc5e3848e6a47 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Tue, 5 Mar 2024 19:04:40 +0100 Subject: [PATCH 2/2] chore: :technologist: update tests --- .github/workflows/test.yml | 1 - .github/workflows/test_hooks.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1c77029..eac1ca9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,6 @@ jobs: id: test uses: ./ # Uses an action in the root directory with: - github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: AndreasAugustin/template.git is_dry_run: true - name: print output diff --git a/.github/workflows/test_hooks.yml b/.github/workflows/test_hooks.yml index 6fe9ffb..f1b1303 100644 --- a/.github/workflows/test_hooks.yml +++ b/.github/workflows/test_hooks.yml @@ -23,7 +23,6 @@ jobs: env: MY_VAR: "bar" with: - github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: AndreasAugustin/template.git upstream_branch: main is_dry_run: true