forked from BlackPeter13/LightningTipBot
-
Notifications
You must be signed in to change notification settings - Fork 1
Release: merge dev into main #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a9e0122
feat: add release workflow and GoReleaser configuration
buddhiwann 0469453
feat: implement memo caching in Send API and enhance Cache utility
buddhiwann b1503de
feat: add duplicate memo check in Send API to prevent reprocessing tr…
buddhiwann e0a75bd
feat: update Telegram notification logic in release workflow to suppo…
buddhiwann debec87
ci: use Actions variables for release chat IDs (RELEASE_CHAT_IDS, DEV…
buddhiwann 7ba9fb4
feat: implement memo locking mechanism in Send API to prevent duplica…
buddhiwann 37dcf97
feat: add step to create local tag in release workflow
buddhiwann 7d5f488
feat: update custom tag format in release workflow to include version…
buddhiwann 13897a5
feat: update version tagging logic in release workflows to use calcul…
buddhiwann d85c77a
feat: upgrade setup-go action to v6 and use PR title in Telegram noti…
buddhiwann 33f57cf
feat: update custom tag format in release workflow to use short SHA
buddhiwann c24dca7
feat: update custom tag format in release workflow to include version…
buddhiwann 8cd60eb
feat: enhance Telegram notification to include PR body description
buddhiwann 8a6c642
feat: implement standing order feature with creation, listing, and de…
mrcentimetre a48e50e
feat: update standing order help text and add command descriptions in…
mrcentimetre 3adb6b9
feat: improve error message for standing order creation failure
mrcentimetre 0562b7f
feat: add analytics API endpoints and filter empty telebot errors (#58)
xbuddhi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| name: Dev Release | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - dev | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| release-dev: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| BOT_TOKEN: ${{ secrets.MAIN_BOT_TOKEN }} | ||
| CHAT_ID: ${{ vars.DEV_RELEASE_CHAT_IDS }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version: '1.21' | ||
|
|
||
| - name: Get short SHA | ||
| id: vars | ||
| run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Calculate next version | ||
| id: calc_version | ||
| uses: mathieudutour/github-tag-action@v6.1 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| dry_run: true | ||
| tag_prefix: "v" | ||
|
|
||
| - name: Tag dev build | ||
| id: tag_version | ||
| uses: mathieudutour/github-tag-action@v6.1 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| custom_tag: v${{ steps.calc_version.outputs.major }}.${{ steps.calc_version.outputs.minor }}.${{ steps.calc_version.outputs.patch }}-${{ steps.vars.outputs.sha_short }} | ||
| tag_prefix: "" | ||
|
|
||
| - name: Create local tag | ||
| run: git tag ${{ steps.tag_version.outputs.new_tag }} | ||
|
|
||
| - name: Run GoReleaser (dev) | ||
| uses: goreleaser/goreleaser-action@v5 | ||
| with: | ||
| distribution: goreleaser | ||
| version: latest | ||
| args: release --clean | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Mark as prerelease | ||
| run: gh release edit ${{ steps.tag_version.outputs.new_tag }} --prerelease | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Notify Telegram (Dev) | ||
| if: success() | ||
| run: | | ||
| IFS=',' read -ra TARGETS <<< "${{ env.CHAT_ID }}" | ||
| for target in "${TARGETS[@]}"; do | ||
| target=$(echo "$target" | xargs) | ||
| if [[ -z "$target" ]]; then | ||
| continue | ||
| fi | ||
| if [[ "$target" == *":"* ]]; then | ||
| chat_id=${target%%:*} | ||
| thread_id=${target#*:} | ||
| curl -s -X POST https://api.telegram.org/bot${{ env.BOT_TOKEN }}/sendMessage \ | ||
| -d chat_id="$chat_id" \ | ||
| -d message_thread_id="$thread_id" \ | ||
| -d text="🧪 *New Dev Build Published!*%0A%0A*Tag:* ${{ steps.tag_version.outputs.new_tag }}%0A*Commit:* ${{ github.sha }}%0A*Author:* ${{ github.actor }}%0A%0A[View Release](https://github.com/${{ github.repository }}/releases/tag/${{ steps.tag_version.outputs.new_tag }})" \ | ||
| -d parse_mode="Markdown" | ||
| else | ||
| curl -s -X POST https://api.telegram.org/bot${{ env.BOT_TOKEN }}/sendMessage \ | ||
| -d chat_id="$target" \ | ||
| -d text="🧪 *New Dev Build Published!*%0A%0A*Tag:* ${{ steps.tag_version.outputs.new_tag }}%0A*Commit:* ${{ github.sha }}%0A*Author:* ${{ github.actor }}%0A%0A[View Release](https://github.com/${{ github.repository }}/releases/tag/${{ steps.tag_version.outputs.new_tag }})" \ | ||
| -d parse_mode="Markdown" | ||
| fi | ||
| done |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [closed] | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| release: | ||
| if: github.event.pull_request.merged == true | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| BOT_TOKEN: ${{ secrets.MAIN_BOT_TOKEN }} | ||
| CHAT_ID: ${{ vars.RELEASE_CHAT_IDS }} | ||
| PR_TITLE: ${{ github.event.pull_request.title }} | ||
| PR_BODY: ${{ github.event.pull_request.body }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version: '1.21' | ||
|
|
||
| - name: Bump version and push tag | ||
| id: tag_version | ||
| uses: mathieudutour/github-tag-action@v6.1 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| default_bump: patch | ||
|
|
||
| - name: Create local tag | ||
| run: git tag ${{ steps.tag_version.outputs.new_tag }} | ||
|
|
||
| - name: Run GoReleaser | ||
| uses: goreleaser/goreleaser-action@v5 | ||
| with: | ||
| distribution: goreleaser | ||
| version: latest | ||
| args: release --clean | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Notify Telegram Success | ||
| if: success() | ||
| run: | | ||
| # Escape PR body for JSON | ||
| ESCAPED_BODY=$(echo "$PR_BODY" | jq -R -s '.') | ||
| # Remove enclosing quotes from jq output | ||
| ESCAPED_BODY="${ESCAPED_BODY:1:-1}" | ||
| # Truncate if too long (Telegram limit is 4096 chars, so 3000 is safe) | ||
| if [ ${#ESCAPED_BODY} -gt 3000 ]; then | ||
| ESCAPED_BODY="${ESCAPED_BODY:0:3000}..." | ||
| fi | ||
|
|
||
| IFS=',' read -ra TARGETS <<< "${{ env.CHAT_ID }}" | ||
| for target in "${TARGETS[@]}"; do | ||
| target=$(echo "$target" | xargs) | ||
| if [[ "$target" == *":"* ]]; then | ||
| chat_id=${target%%:*} | ||
| thread_id=${target#*:} | ||
| curl -s -X POST https://api.telegram.org/bot${{ env.BOT_TOKEN }}/sendMessage \ | ||
| -d chat_id="$chat_id" \ | ||
| -d message_thread_id="$thread_id" \ | ||
| -d text="🚀 *New Release Published!*%0A%0A*Version:* ${{ steps.tag_version.outputs.new_tag }}%0A*Title:* ${PR_TITLE}%0A*Author:* ${{ github.actor }}%0A%0A*Description:*%0A${ESCAPED_BODY}%0A%0A🔗 *Release Link:*%0Ahttps://github.com/${{ github.repository }}/releases/tag/${{ steps.tag_version.outputs.new_tag }}" \ | ||
| -d parse_mode="Markdown" | ||
| else | ||
| curl -s -X POST https://api.telegram.org/bot${{ env.BOT_TOKEN }}/sendMessage \ | ||
| -d chat_id="$target" \ | ||
| -d text="🚀 *New Release Published!*%0A%0A*Version:* ${{ steps.tag_version.outputs.new_tag }}%0A*Title:* ${PR_TITLE}%0A*Author:* ${{ github.actor }}%0A%0A*Description:*%0A${ESCAPED_BODY}%0A%0A🔗 *Release Link:*%0Ahttps://github.com/${{ github.repository }}/releases/tag/${{ steps.tag_version.outputs.new_tag }}" \ | ||
| -d parse_mode="Markdown" | ||
| fi | ||
| done | ||
|
|
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| project_name: BitcoinDeepaBot | ||
| builds: | ||
| - env: | ||
| - CGO_ENABLED=1 | ||
| goos: | ||
| - linux | ||
| goarch: | ||
| - amd64 | ||
| flags: | ||
| - -a | ||
| - -installsuffix | ||
| - cgo | ||
| ldflags: | ||
| - -s -w | ||
| checksum: | ||
| name_template: 'checksums.txt' | ||
| snapshot: | ||
| name_template: "{{ .Tag }}-next" | ||
| changelog: | ||
| sort: asc | ||
| filters: | ||
| exclude: | ||
| - '^docs:' | ||
| - '^test:' |
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: CeyLabs/BitcoinDeepaBot
Length of output: 115
🏁 Script executed:
Repository: CeyLabs/BitcoinDeepaBot
Length of output: 406
🏁 Script executed:
Repository: CeyLabs/BitcoinDeepaBot
Length of output: 1138
🏁 Script executed:
Repository: CeyLabs/BitcoinDeepaBot
Length of output: 4926
Remove .gitignore entries for non-existent files.
The analytics feature is being added via
analytics.go(620 lines with inline documentation of the API), but the.mddocumentation files and Python scripts referenced in.gitignore(lines 12-15) are not part of this PR. Adding.gitignoreentries for non-existent files is unnecessary and creates maintenance clutter. Remove these entries unless they represent auto-generated or build artifacts that are actually produced by the build process.🤖 Prompt for AI Agents