From 72b455d0916b9b1930134bc3a5c5bbb25449efe4 Mon Sep 17 00:00:00 2001 From: Kristin Brown Date: Fri, 7 Aug 2026 12:35:11 -0400 Subject: [PATCH] Fixed PR link Signed-off-by: Kristin Brown --- .github/workflows/push-docs.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push-docs.yaml b/.github/workflows/push-docs.yaml index 1b63354e65f..9b5f53d6999 100644 --- a/.github/workflows/push-docs.yaml +++ b/.github/workflows/push-docs.yaml @@ -461,6 +461,8 @@ jobs: needs: [prepare-oss, regen-oss] if: always() && needs.prepare-oss.result == 'success' && (needs.regen-oss.result == 'success' || needs.regen-oss.result == 'skipped') runs-on: ubuntu-latest + outputs: + pr_url: ${{ steps.cpr.outputs.pull-request-url }} steps: - name: Checkout docs repo uses: actions/checkout@v5 @@ -520,6 +522,7 @@ jobs: echo "DOCSGEN_EOF" } >> "$GITHUB_OUTPUT" - name: Push and create the consolidated PR + id: cpr if: steps.apply.outputs.changed == 'true' uses: peter-evans/create-pull-request@v7 with: @@ -549,6 +552,11 @@ jobs: steps: - name: Notify in slack of success if: needs.assemble-oss.result == 'success' + env: + # Falls back to the pulls list only for the edge case where nothing changed and no PR + # was created this run (create-pull-request still outputs a URL when it updates an + # existing open PR, so this is the normal link on every run that has real changes). + PR_URL: ${{ needs.assemble-oss.outputs.pr_url || 'https://github.com/solo-io/docs/pulls' }} uses: slackapi/slack-github-action@v3.0.3 with: method: chat.postMessage @@ -556,13 +564,13 @@ jobs: payload: | { "channel": "C04DYBSJK0R", - "text": "✅ *Success:* Consolidated reference-docs copy for all supported lines succeeded. ", + "text": "✅ *Success:* Consolidated reference-docs copy for all supported lines succeeded. <${{ env.PR_URL }}|Review the PR>", "blocks": [ { "type": "section", "text": { "type": "mrkdwn", - "text": "✅ *Success:* Consolidated reference-docs copy for all supported lines succeeded. " + "text": "✅ *Success:* Consolidated reference-docs copy for all supported lines succeeded. <${{ env.PR_URL }}|Review the PR>" } } ] @@ -790,6 +798,7 @@ jobs: sed -i '1,2d' assets/gateway-docs/pages/reference/gateway_parameters_${{ steps.version-variables.outputs.minor }}.md popd || exit 1 - name: Push and create PR + id: cpr uses: peter-evans/create-pull-request@v7 with: base: main @@ -811,13 +820,13 @@ jobs: payload: | { "channel": "C04DYBSJK0R", - "text": "✅ *Success:* Automated copy of enterprise reference docs for ${{ steps.version-variables.outputs.minor }} was successful. ", + "text": "✅ *Success:* Automated copy of enterprise reference docs for ${{ steps.version-variables.outputs.minor }} was successful. <${{ steps.cpr.outputs.pull-request-url }}|Review the PR>", "blocks": [ { "type": "section", "text": { "type": "mrkdwn", - "text": "✅ *Success:* Automated copy of enterprise reference docs for ${{ steps.version-variables.outputs.minor }} was successful. " + "text": "✅ *Success:* Automated copy of enterprise reference docs for ${{ steps.version-variables.outputs.minor }} was successful. <${{ steps.cpr.outputs.pull-request-url }}|Review the PR>" } } ]