From 31d28c0a2e821f13293f128064751c7c6e1e937b Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Fri, 20 Dec 2019 13:41:59 +0100 Subject: [PATCH] .github/workflows: Shorten the URLs from github --- .github/workflows/notify-issue.yaml | 9 ++++++++- .github/workflows/notify-pr.yaml | 9 ++++++++- .github/workflows/notify-push.yaml | 8 +++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/notify-issue.yaml b/.github/workflows/notify-issue.yaml index b7f999d47bc..d218f59b158 100644 --- a/.github/workflows/notify-issue.yaml +++ b/.github/workflows/notify-issue.yaml @@ -8,6 +8,12 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 3 steps: + - name: Shorten URL + id: shortener + if: github.repository == 'void-linux/void-packages' + uses: Gottox/url-shortener-action@master + with: + url: "${{ github.event.issue.html_url }}" - name: "Issue Notification" uses: Gottox/irc-message-action@master if: github.repository == 'void-linux/void-packages' @@ -20,5 +26,6 @@ jobs: message: >- ${{ github.actor }} ${{ github.event.action }} issue + #${{ github.event.issue.number }} “${{ github.event.issue.title }}” - ${{ github.event.issue.html_url }} + ${{ steps.shortener.outputs.short_url }} diff --git a/.github/workflows/notify-pr.yaml b/.github/workflows/notify-pr.yaml index acbccc85f7e..edc1386afc5 100644 --- a/.github/workflows/notify-pr.yaml +++ b/.github/workflows/notify-pr.yaml @@ -8,6 +8,12 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 3 steps: + - name: Shorten URL + id: shortener + if: github.repository == 'void-linux/void-packages' + uses: Gottox/url-shortener-action@master + with: + url: "${{ github.event.pull_request.html_url }}" - name: "Pull Request Notification" uses: Gottox/irc-message-action@master if: github.repository == 'void-linux/void-packages' @@ -20,5 +26,6 @@ jobs: message: >- ${{ github.actor }} ${{ github.event.action }} pull request + #${{ github.event.pull_request.number }} “${{ github.event.pull_request.title }}” - ${{ github.event.pull_request.html_url }} + ${{ steps.shortener.outputs.short_url }} diff --git a/.github/workflows/notify-push.yaml b/.github/workflows/notify-push.yaml index 9be0d2a87df..a28520e017f 100644 --- a/.github/workflows/notify-push.yaml +++ b/.github/workflows/notify-push.yaml @@ -8,6 +8,12 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 3 steps: + - name: Shorten URL + id: shortener + if: github.repository == 'void-linux/void-packages' + uses: Gottox/url-shortener-action@master + with: + url: "${{ github.event.compare }}" - name: "Push Notification" uses: Gottox/irc-message-action@master if: github.repository == 'void-linux/void-packages' @@ -20,4 +26,4 @@ jobs: message: >- ${{ github.actor }} pushed - ${{ github.event.compare }}" + ${{ steps.shortener.outputs.short_url }}