Option to subscribe to threads and receive notification every time someone reply in the thread #641
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Notify | |
on: | |
issues: | |
types: | |
opened | |
pull_request: | |
types: | |
- closed | |
jobs: | |
notify-issue: | |
if: ${{ github.event_name == 'issues' }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: snow-actions/[email protected] | |
with: | |
relays: ${{ vars.NOSTR_RELAYS }} | |
private-key: ${{ secrets.NOSTR_PRIVATE_KEY }} | |
content: | | |
Issue by @${{ github.event.sender.login }}: ${{ github.event.issue.title }} | |
${{ github.event.issue.html_url }} #nostter | |
tags: | | |
- ["t", "nostter"] | |
notify-pr: | |
if: ${{ github.event.pull_request.merged == true }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: snow-actions/[email protected] | |
with: | |
relays: ${{ vars.NOSTR_RELAYS }} | |
private-key: ${{ secrets.NOSTR_PRIVATE_KEY }} | |
content: | | |
PR merged: ${{ github.event.pull_request.title }} | |
${{ github.event.pull_request.html_url }} #nostter | |
tags: | | |
- ["t", "nostter"] | |
user-status: | |
if: ${{ github.event.pull_request.merged == true }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- run: echo "expiration=$(date +%s --date '12 hours')" >> $GITHUB_ENV | |
- uses: snow-actions/[email protected] | |
with: | |
relays: ${{ vars.NOSTR_RELAYS }} | |
private-key: ${{ secrets.NOSTR_PRIVATE_KEY }} | |
kind: 30315 | |
content: | | |
#nostter ${{ github.event.pull_request.title }} | |
tags: | | |
- ["d", "general"] | |
- ["t", "nostter"] | |
- ["r", "https://nostter.vercel.app/"] | |
- ["expiration", "${{ env.expiration }}"] |