You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2022/05/16 19:26:54 UTC

[solr-docker] branch main updated: Update existing PR on commit, fix github links (#5)

This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-docker.git


The following commit(s) were added to refs/heads/main by this push:
     new 5b6303d  Update existing PR on commit, fix github links (#5)
5b6303d is described below

commit 5b6303d772624d0d56ad42356b2b29869b3a6c9d
Author: Houston Putman <ho...@apache.org>
AuthorDate: Mon May 16 15:26:49 2022 -0400

    Update existing PR on commit, fix github links (#5)
---
 .github/workflows/pr-for-official-repo.yml | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/pr-for-official-repo.yml b/.github/workflows/pr-for-official-repo.yml
index 07c99e7..c209913 100644
--- a/.github/workflows/pr-for-official-repo.yml
+++ b/.github/workflows/pr-for-official-repo.yml
@@ -22,14 +22,17 @@ jobs:
       - name: Checkout official-images fork
         uses: actions/checkout@v3
         with:
-          repository: docker-library/official-images
+          #repository: docker-library/official-images
+          repository: docker-solr/official-images
           path: official-images
       - name: check headcommit message
         id: commit
         run: |
           str="$(jq '.head_commit.message' $GITHUB_EVENT_PATH)"    # get the head_commit message
-          echo ::set-output name=title::${str%%\\n*} | tr -d '"'         # get the title
-          echo ::set-output name=body::${str##*\\n} | tr -d '"'
+          message="$(echo ${str} | tr -d '"'  | sed -E 's/(#[0-9]+([^0-9]|\z?))/apache\/solr-docker\1/g'}"  # get the message, substituting the github links
+          echo ::set-output name=title::${message}         # get the message
+          echo ::set-output name=title::${message%%\\n*}   # get the title
+          echo ::set-output name=body::${message##*\\n}    # get the body
       - name: Install BashBrew
         run: |
           mkdir -p "${HOME}/.local/bin"
@@ -42,15 +45,15 @@ jobs:
         uses: peter-evans/create-pull-request@v4
         with:
           path: official-images
-          push-to-fork: docker-solr/official-images
+          #push-to-fork: docker-solr/official-images
           add-paths: library/solr
-          branch-suffix: short-commit-hash
-          commit-message: "Apache Solr - ${{ github.event.commits[0].message }}"
+          branch: apache-solr-automated-pr
+          commit-message: "Apache Solr - ${{ steps.commit.outputs.message}}"
           title: "Apache Solr - ${{ steps.commit.outputs.title}}"
           body: |
             Apache Solr:
             
-            ${{ github.event.commits[0].message }}
+            ${{ steps.commit.outputs.message}}
             
             Relevant Maintainers: @HoustonPutman @janhoy @dsmiley @madrob