Articles on: Support

GitHub Code Snippets Not Displaying in Slack

Issue:


Users may not see GitHub code snippets in Slack, with only a Code Snippet hyperlink appearing instead.

Axolo relies on the GitHub app for code snippets because Axolo does not have direct access to your code. This integration ensures you see relevant code snippets in Slack.

Step-by-Step Troubleshooting:



1. Ensure GitHub Slack App is Installed


- The code snippet feature relies on the GitHub Slack app. Confirm that the app is installed in your Slack workspace.
- If not installed, add it from the Slack App Directory.




2. Check GitHub App Permissions


- Ensure the GitHub app has access to the repository you want to display code snippets from.
- If the app doesn’t have the necessary permissions, it won’t be able to display code snippets.

3. Connect GitHub and Slack Accounts


- Ensure your GitHub account is properly connected to Slack.
- Go to your GitHub settings and verify the integration with Slack is active and linked to the correct Slack workspace.

To do so, you can follow the GitHub guide.



4. Check Slack Attachment Settings


- Sometimes, Slack settings for attachments can hide URLs from specific apps, including GitHub.
- Visit slack.com/admin/attachments and ensure that the settings allow GitHub URLs to display.

5. Reinstall the GitHub Slack App


- If permissions and installation seem correct but the issue persists, try reinstalling the GitHub app in Slack.
- After reinstalling, ensure it has access to the necessary repositories.

6. Testing


- Once all settings are confirmed, try posting a GitHub link in Slack to see if the code snippet appears.


If you continue to experience issues, feel free to contact our support team for further assistance.

Updated on: 22/08/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!