From 05cd2f7538a594a73bb68ca7b6c39f72043841de Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 14 Mar 2023 11:14:37 +0100 Subject: [PATCH 01/13] Initial commit --- .gitattributes | 2 + .github/dependabot.yml | 22 ++ .github/workflows/update-from-template.yml | 92 ++++++ .idea/checkstyle-idea.xml | 20 ++ .idea/codeStyles/Project.xml | 92 ++++++ .idea/codeStyles/codeStyleConfig.xml | 5 + .idea/inspectionProfiles/Project_Default.xml | 6 + .idea/saveactions_settings.xml | 21 ++ CHANGELOG.md | 0 SECURITY.md | 5 + config/checkstyle/checkstyle.xml | 311 +++++++++++++++++++ 11 files changed, 576 insertions(+) create mode 100644 .gitattributes create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/update-from-template.yml create mode 100644 .idea/checkstyle-idea.xml create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/saveactions_settings.xml create mode 100644 CHANGELOG.md create mode 100644 SECURITY.md create mode 100644 config/checkstyle/checkstyle.xml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..28d6d7b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,22 @@ +version: 2 +updates: +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + # Run it at a specific time so that we don't get emails all day long + time: "00:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: "*" + # GitHub actions are using git tags (v1 = v1.2 = v1.2.3) which should be compatible until a major change is performed + update-types: + - "version-update:semver-minor" + - "version-update:semver-patch" +- package-ecosystem: maven + directory: "/" + schedule: + interval: daily + # Run it at a specific time so that we don't get emails all day long + time: "00:00" + open-pull-requests-limit: 10 diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml new file mode 100644 index 0000000..60bad1d --- /dev/null +++ b/.github/workflows/update-from-template.yml @@ -0,0 +1,92 @@ +name: Update from Template + +# This workflow keeps the repo up to date with changes from the template repo (REMOTE_URL) +# It duplicates the REMOTE_BRANCH (into UPDATE_BRANCH) and tries to merge it into the +# this repos default branch (which is checked out here) +# Note that this requires a PAT (Personal Access Token) - at best from a servicing account +# Also note that you should have at least once merged the template repo into the current repo manually +# otherwise a "refusing to merge unrelated histories" error might occur. + +on: + schedule: + - cron: '55 2 * * 1' + workflow_dispatch: + +env: + UPDATE_BRANCH: update-from-template + REMOTE_URL: https://github.com/xdev-software/base-template.git + REMOTE_BRANCH: master + +permissions: + contents: write + pull-requests: write + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + # Required because otherwise there are always changes detected when executing diff/rev-list + fetch-depth: 0 + # If no PAT is used the following error occurs on a push: + # refusing to allow a GitHub App to create or update workflow `.github/workflows/xxx.yml` without `workflows` permission + token: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} + + - name: Init Git + run: | + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions" + + - name: Main workflow + id: main + run: | + echo "Adding remote template-repo" + git remote add template ${{ env.REMOTE_URL }} + + echo "Fetching remote template repo" + git fetch template + + echo "Deleting local branch that will contain the updates - if present" + git branch -D ${{ env.UPDATE_BRANCH }} || true + + echo "Checking if the remote template repo has new commits" + git rev-list ..template/${{ env.REMOTE_BRANCH }} + + if [ $(git rev-list --count ..template/${{ env.REMOTE_BRANCH }}) -eq 0 ]; then + echo "There are no commits new commits on the template repo" + + echo "Deleting origin branch that contains the updates - if present" + git push -f origin --delete ${{ env.UPDATE_BRANCH }} || true + + echo "abort=1" >> $GITHUB_OUTPUT + exit 0 + fi + + echo "Found new commits on the template repo" + + echo "Creating update branch" + git branch ${{ env.UPDATE_BRANCH }} template/${{ env.REMOTE_BRANCH }} + git branch --unset-upstream ${{ env.UPDATE_BRANCH }} + + echo "Pushing update branch" + git push -f -u origin ${{ env.UPDATE_BRANCH }} + + echo "Getting current branch" + current_branch=$(git branch --show-current) + echo "Current branch is $current_branch" + echo "current_branch=$current_branch" >> $GITHUB_OUTPUT + + echo "abort=0" >> $GITHUB_OUTPUT + + - name: pull-request + uses: repo-sync/pull-request@v2 + if: steps.main.outputs.abort == 0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + source_branch: ${{ env.UPDATE_BRANCH }} + destination_branch: ${{ steps.main.outputs.current_branch }} + pr_title: "Update from template" + pr_body: "An automated PR to sync changes from the template into this repo" + diff --git a/.idea/checkstyle-idea.xml b/.idea/checkstyle-idea.xml new file mode 100644 index 0000000..f68c212 --- /dev/null +++ b/.idea/checkstyle-idea.xml @@ -0,0 +1,20 @@ + + + + 10.1 + JavaOnlyWithTests + true + true + + + + diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..ffd40bd --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,92 @@ + + + + diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..6a1691d --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/saveactions_settings.xml b/.idea/saveactions_settings.xml new file mode 100644 index 0000000..71a42c4 --- /dev/null +++ b/.idea/saveactions_settings.xml @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..a6711ca --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,5 @@ +# Security Policy + +## Reporting a Vulnerability + +Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/vaadin-addon-template/security/advisories/new). diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml new file mode 100644 index 0000000..710e3e6 --- /dev/null +++ b/config/checkstyle/checkstyle.xml @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 552af797eadae929d3843505f51cd5d0a5a0bc56 Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Tue, 14 Mar 2023 11:46:42 +0100 Subject: [PATCH 02/13] Fix url --- SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index a6711ca..36d6305 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,4 +2,4 @@ ## Reporting a Vulnerability -Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/vaadin-addon-template/security/advisories/new). +Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/base-template/security/advisories/new). From 6bd011f0bf56c2b7f5c388bc241e16f390d84680 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Mar 2023 01:10:06 +0000 Subject: [PATCH 03/13] Bump license-maven-plugin from 4.1 to 4.2 Bumps license-maven-plugin from 4.1 to 4.2. --- updated-dependencies: - dependency-name: com.mycila:license-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e278db7..99d8c80 100644 --- a/pom.xml +++ b/pom.xml @@ -95,7 +95,7 @@ com.mycila license-maven-plugin - 4.1 + 4.2 ${project.organization.url} From affa5790308608a2af950f17337465ccaaa443e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 May 2023 01:14:48 +0000 Subject: [PATCH 04/13] Bump maven-gpg-plugin from 3.0.1 to 3.1.0 Bumps [maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.0.1 to 3.1.0. - [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.0.1...maven-gpg-plugin-3.1.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-gpg-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 99d8c80..09e98d0 100644 --- a/pom.xml +++ b/pom.xml @@ -175,7 +175,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 3.1.0 sign-artifacts From b36b11b1e1229688f254f177a0c3209451e19e81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 01:42:02 +0000 Subject: [PATCH 05/13] Bump maven-source-plugin from 3.2.1 to 3.3.0 Bumps [maven-source-plugin](https://github.com/apache/maven-source-plugin) from 3.2.1 to 3.3.0. - [Commits](https://github.com/apache/maven-source-plugin/compare/maven-source-plugin-3.2.1...maven-source-plugin-3.3.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-source-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 09e98d0..32f212d 100644 --- a/pom.xml +++ b/pom.xml @@ -154,7 +154,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.1 + 3.3.0 attach-sources From 8faa43fcc007af1951b2ec0b3daddfc5f9a17281 Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Mon, 26 Jun 2023 10:02:26 +0200 Subject: [PATCH 06/13] Replace deprecated save actions plugin with XDEV fork --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 833ebfe..068973c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,7 @@ You should have the following things installed: ### Recommended setup * Install ``IntelliJ`` (Community Edition is sufficient) * Install the following plugins: - * [Save Actions](https://plugins.jetbrains.com/plugin/7642-save-actions) - Provides save actions, like running the formatter or adding ``final`` to fields + * [Save Actions](https://plugins.jetbrains.com/plugin/22113) - Provides save actions, like running the formatter or adding ``final`` to fields * [SonarLint](https://plugins.jetbrains.com/plugin/7973-sonarlint) - CodeStyle/CodeAnalysis * [Checkstyle-IDEA](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea) - CodeStyle/CodeAnalysis * Import the project @@ -42,4 +42,4 @@ Before releasing: If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes. When the release is finished do the following: -* Merge the auto-generated PR (with the incremented version number) back into the ``develop`` \ No newline at end of file +* Merge the auto-generated PR (with the incremented version number) back into the ``develop`` From 21af937dc803804b6f705916f3f072912cefbff7 Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Fri, 7 Jul 2023 12:21:15 +0200 Subject: [PATCH 07/13] Rework CONTRIBUTING.md --- CONTRIBUTING.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 068973c..e5e5fc6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,19 +1,18 @@ ## Contributing -We would absolutely love to get the community involved, and we welcome any form of contributions – comments and questions on different communication channels, issues and pull request in the repositories, and anything that you build and share using our components. +We would absolutely love to get the community involved, and we welcome any form of contributions – comments and questions on different communication channels, issues and pull request and anything that you build and share using our components. -### Get in touch with the team +### Communication channels +* Communication is primarily done using issues. +* If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support). +* As a last resort measure or on otherwise important matter you may also [contact us directly](https://xdev.software/en/about-us/contact). -Twitter: https://twitter.com/xdevsoftware -
-Mail: opensource@xdev-software.de +### Ways to help +* **Report bugs**
Create an issue or send a pull request +* **Send pull requests**
If you want to contribute code, check out the development instructions below. + * However when contributing new features, please first discuss the change you wish to make via issue with the owners of this repository before making a change. Otherwise your work might be rejected and your effort was pointless. -### Some ways to help: - -- **Report bugs**: File issues on GitHub. -- **Send pull requests**: If you want to contribute code, check out the development instructions below. - -We encourage you to read the [contribution instructions by GitHub](https://guides.github.com/activities/contributing-to-open-source/#contributing) also. +We also encourage you to read the [contribution instructions by GitHub](https://docs.github.com/en/get-started/quickstart/contributing-to-projects). ## Developing From 4883a900e7da367aca455ba52e5cadc9a223d531 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 00:21:20 +0000 Subject: [PATCH 08/13] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/update-from-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index 60bad1d..ab0b49e 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # Required because otherwise there are always changes detected when executing diff/rev-list fetch-depth: 0 From 19fc8593128e0a70e3080a8f4f99c38c080e6b83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 07:30:55 +0000 Subject: [PATCH 09/13] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/checkBuild.yml | 2 +- .github/workflows/release.yml | 10 +++++----- .github/workflows/test-deploy.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/checkBuild.yml b/.github/workflows/checkBuild.yml index 5f58731..3575f38 100644 --- a/.github/workflows/checkBuild.yml +++ b/.github/workflows/checkBuild.yml @@ -22,7 +22,7 @@ jobs: distribution: [temurin] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK uses: actions/setup-java@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b8b70a..f852928 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: check_code: # Validates the code (see checkBuild.yml) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK uses: actions/setup-java@v3 @@ -48,7 +48,7 @@ jobs: outputs: upload_url: ${{ steps.create_draft.outputs.upload_url }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Configure Git run: | @@ -97,7 +97,7 @@ jobs: runs-on: ubuntu-latest needs: [prepare_release] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Init Git and pull run: | @@ -128,7 +128,7 @@ jobs: runs-on: ubuntu-latest needs: [prepare_release] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Init Git and pull run: | @@ -180,7 +180,7 @@ jobs: runs-on: ubuntu-latest needs: [publish_central] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Init Git and pull run: | diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index da549c1..5d923a7 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -7,7 +7,7 @@ jobs: publish_central: # Publish the code to central runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK OSSRH uses: actions/setup-java@v3 From 226acf0fc796528400bea043003ee08933be0032 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 01:04:00 +0000 Subject: [PATCH 10/13] Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.5.0 to 3.6.0 Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.5.0...maven-javadoc-plugin-3.6.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 32f212d..dd7e8f7 100644 --- a/pom.xml +++ b/pom.xml @@ -136,7 +136,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.5.0 + 3.6.0 attach-javadocs From 7ee60eae2ff795f4db96af92a0b61501a27a418a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 00:15:27 +0000 Subject: [PATCH 11/13] Bump com.mycila:license-maven-plugin from 4.2 to 4.3 Bumps com.mycila:license-maven-plugin from 4.2 to 4.3. --- updated-dependencies: - dependency-name: com.mycila:license-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 32f212d..5f22d01 100644 --- a/pom.xml +++ b/pom.xml @@ -95,7 +95,7 @@ com.mycila license-maven-plugin - 4.2 + 4.3 ${project.organization.url} From 8980688df58baa1717d5326f56e58d9a28a0546e Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Mon, 2 Oct 2023 12:46:22 +0200 Subject: [PATCH 12/13] Update update-from-template.yml --- .github/workflows/update-from-template.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index ab0b49e..2b41fdd 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -81,12 +81,14 @@ jobs: echo "abort=0" >> $GITHUB_OUTPUT - name: pull-request - uses: repo-sync/pull-request@v2 if: steps.main.outputs.abort == 0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - source_branch: ${{ env.UPDATE_BRANCH }} - destination_branch: ${{ steps.main.outputs.current_branch }} - pr_title: "Update from template" - pr_body: "An automated PR to sync changes from the template into this repo" - + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh_pr_up() { + gh pr create "$@" || gh pr edit "$@" + } + gh_pr_up -B "${{ steps.main.outputs.current_branch }}" \ + -H "${{ env.UPDATE_BRANCH }}" \ + --title "Update from template" \ + --body "An automated PR to sync changes from the template into this repo" From 07b18238e6e4f3e5aa5ae5ca6912f48aa346779d Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Mon, 2 Oct 2023 12:53:50 +0200 Subject: [PATCH 13/13] Replace outdated repo-sync/pull-request --- .github/workflows/release.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f852928..af6ac67 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -198,8 +198,12 @@ jobs: git push origin - name: pull-request - uses: repo-sync/pull-request@v2 - with: - destination_branch: "develop" - pr_title: "Sync back" - pr_body: "An automated PR to sync changes back" + env: + GH_TOKEN: ${{ github.token }} + run: | + gh_pr_up() { + gh pr create "$@" || gh pr edit "$@" + } + gh_pr_up -B "develop" \ + --title "Sync back" \ + --body "An automated PR to sync changes back"