Skip to content

Cannot resize the navigator (Probably trivial fix! Easy repro steps! Show Balazs how to write good code!) #1151

Cannot resize the navigator (Probably trivial fix! Easy repro steps! Show Balazs how to write good code!)

Cannot resize the navigator (Probably trivial fix! Easy repro steps! Show Balazs how to write good code!) #1151

name: Discord Integration - Issue Opened
on:
issues:
types: [opened]
permissions:
actions: none
checks: none
contents: none
deployments: none
id-token: none
issues: none
packages: none
pages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
jobs:
post-to-discord:
name: Post Notification To Discord
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Build Embeds JSON
env:
TEMPLATE: >-
[{
"author": {
"name": $author_name,
"icon_url": $author_icon_url,
"url": $author_html_url
},
"title": $title,
"color": 3581519,
"url": $html_url,
"description": $description,
"footer": {
"text": $repo_full_name
}
}]
AUTHOR: ${{ github.event.sender.login }}
AUTHOR_ICON_URL: ${{ github.event.sender.avatar_url }}
AUTHOR_HTML_URL: ${{ github.event.sender.html_url }}
TITLE: '#${{ github.event.issue.number }} ${{ github.event.issue.title }}'
HTML_URL: ${{ github.event.issue.html_url }}
DESCRIPTION: ${{ github.event.issue.body }}
REPO_FULL_NAME: ${{ github.event.repository.full_name }}
run: |
# This provides the env variable used by the next step
# We have to do it like this to prevent any of the values screwing up the json
echo "DISCORD_EMBEDS=$(jq -nc --arg author_name "$AUTHOR" --arg author_icon_url "$AUTHOR_ICON_URL" --arg author_html_url "$AUTHOR_HTML_URL" --arg title "$TITLE" --arg html_url "$HTML_URL" --arg description "$DESCRIPTION" --arg repo_full_name "$REPO_FULL_NAME" "$TEMPLATE")" >> $GITHUB_ENV
- name: Send Notification
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_ISSUES_WEBHOOK }}
DISCORD_USERNAME: 'GitHub'
DISCORD_AVATAR: https://octodex.github.com/images/original.png
SENDER_NAME: ${{ github.event.sender.login }}
with:
args: 'Issue opened by ${{ env.SENDER_NAME }}'