Variable $GIT_REPOSITORY_URL empty when trying to use it in Slack message

Hello, I was trying to add Slack message to my application but I’ve encountered a problem - button with $GIT_REPOSITORY_URL doesn’t work. Probably $GIT_REPOSITORY_URL was empty.

  - slack@2.7.2:
        - webhook_url: $SLACK_WEBHOOK_URL
        - channel: "$SLACK_CHANNEL"
        - channel_on_error: "$SLACK_CHANNEL"
        - author_name: 'Build #$BITRISE_BUILD_NUMBER triggered by $GIT_CLONE_COMMIT_AUTHOR_NAME'
        - title: ''
        - fields: |-
        - buttons: |-
            View on Bitrise|${BITRISE_BUILD_URL}
            View on GitHub|${GIT_REPOSITORY_URL}

Everything works perfectly except of this ‘View on GitHub’ button - it’s not showing up.

Hi @MichalTKwiecien,

Thanks for reporting!

The most likely explanation is that GIT_REPOSITORY_URL is the git clone URL, which might not be a browsable URL. E.g. it might be something like

It’s the git clone URL you specify on the Settings tab of the app as the “REPOSITORY URL”.

Thanks for the response @viktorbenei . You are probably right because I’m using ssh instead of login/password authorisation. Since it’s not valid URL the button is not visible.

So now I think it’s a feature, not a bug :wink:

1 Like