From 9fc68f45be76a7a6a2d039bb4a4920f19e2b5af5 Mon Sep 17 00:00:00 2001 From: Josh Date: Sun, 15 Feb 2026 20:47:08 +0800 Subject: [PATCH 1/5] Update README.md --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ef2e2da..f21643e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,15 @@ Lightning fast, ad free, super lightweight native video compressor for Android ( -[![RB Status](https://shields.rbtlog.dev/simple/compress.joshattic.us?style=for-the-badge)](https://shields.rbtlog.dev/compress.joshattic.us) ![IzzyOnDroid Version](https://img.shields.io/endpoint?url=https://apt.izzysoft.de/fdroid/api/v1/shield/compress.joshattic.us&label=IzzyOnDroid%20Version&style=for-the-badge) [![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/JoshAtticus/Compressor/total?style=for-the-badge&label=GitHub%20Downloads&v=2)](https://github.com/JoshAtticus/Compressor/releases) ![Kotlin](https://img.shields.io/badge/kotlin-%237F52FF.svg?style=for-the-badge&logo=kotlin&logoColor=white) ![Android](https://img.shields.io/badge/Android-3DDC84?style=for-the-badge&logo=android&logoColor=white) ![License](https://img.shields.io/github/license/JoshAtticus/Compressor?style=for-the-badge) ![Stars](https://img.shields.io/github/stars/JoshAtticus/Compressor?style=for-the-badge) ![Forks](https://img.shields.io/github/forks/JoshAtticus/Compressor?style=for-the-badge) +![Kotlin](https://img.shields.io/badge/kotlin-%237F52FF.svg?style=for-the-badge&logo=kotlin&logoColor=white) ![Android](https://img.shields.io/badge/Android-3DDC84?style=for-the-badge&logo=android&logoColor=white) ![License](https://img.shields.io/github/license/JoshAtticus/Compressor?style=for-the-badge) + +**Stats** + +[![RB Status](https://shields.rbtlog.dev/simple/compress.joshattic.us?style=for-the-badge)](https://shields.rbtlog.dev/compress.joshattic.us) ![IzzyOnDroid Version](https://img.shields.io/endpoint?url=https://apt.izzysoft.de/fdroid/api/v1/shield/compress.joshattic.us&label=IzzyOnDroid%20Version&style=for-the-badge) ![Stars](https://img.shields.io/github/stars/JoshAtticus/Compressor?style=for-the-badge) ![Forks](https://img.shields.io/github/forks/JoshAtticus/Compressor?style=for-the-badge) + +**Downloads** + +[![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/JoshAtticus/Compressor/total?style=for-the-badge&label=GitHub%20Downloads&v=2)](https://github.com/JoshAtticus/Compressor/releases) [![IzzyOnDroid Downloads (This year)](https://img.shields.io/badge/dynamic/json?url=https://dlstats.izzyondroid.org/iod-stats-collector/stats/basic/yearly/rolling.json&query=$.['compress.joshattic.us']&label=IzzyOnDroid%20yearly%20downloads&style=for-the-badge)](https://apt.izzysoft.de/packages/compress.joshattic.us) [![Google Play Downloads](https://img.shields.io/endpoint?color=green&style=for-the-badge&url=https%3A%2F%2Fplay.cuzi.workers.dev%2Fplay%3Fi%3Dcompress.joshattic.us%26gl%3DUS%26hl%3Den%26l%3DGoogle%2520Play%2520Store%2520Downloads%26m%3D%24totalinstalls)](https://play.google.com/store/apps/details?id=compress.joshattic.us) Do you like Compressor? Consider supporting development by [buying me a coffee](https://www.buymeacoffee.com/joshatticus) ☕️ From 22bedcc3ab55b1a1ba183e94e841806227bf9736 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 16 Feb 2026 19:28:52 +0800 Subject: [PATCH 2/5] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index f21643e..c8e85c3 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ Lightning fast, ad free, super lightweight native video compressor for Android ( [![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/JoshAtticus/Compressor/total?style=for-the-badge&label=GitHub%20Downloads&v=2)](https://github.com/JoshAtticus/Compressor/releases) [![IzzyOnDroid Downloads (This year)](https://img.shields.io/badge/dynamic/json?url=https://dlstats.izzyondroid.org/iod-stats-collector/stats/basic/yearly/rolling.json&query=$.['compress.joshattic.us']&label=IzzyOnDroid%20yearly%20downloads&style=for-the-badge)](https://apt.izzysoft.de/packages/compress.joshattic.us) [![Google Play Downloads](https://img.shields.io/endpoint?color=green&style=for-the-badge&url=https%3A%2F%2Fplay.cuzi.workers.dev%2Fplay%3Fi%3Dcompress.joshattic.us%26gl%3DUS%26hl%3Den%26l%3DGoogle%2520Play%2520Store%2520Downloads%26m%3D%24totalinstalls)](https://play.google.com/store/apps/details?id=compress.joshattic.us) +### Yes, reproducible builds have failed, I'm sorry +I'm not going to push blame onto anybody else, this is completely my fault. I've worked really hard on Compressor over the past month, and it's starting to burn me out. I've been trying to fix user issues within 24-48 hours, and in doing so, have been pushing updates very frequently. You may have noticed I've already started releasing and committing less frequently. If I don't respond to your issue instantly, please don't take it personally, I have a life too, I work on Compressor completely for free, and thank you so much for using Compressor :) + Do you like Compressor? Consider supporting development by [buying me a coffee](https://www.buymeacoffee.com/joshatticus) ☕️ You can also donate with crypto From 6b069f41a33ca31de55a36305c526b989e6bbb47 Mon Sep 17 00:00:00 2001 From: JoshAtticus Date: Mon, 16 Feb 2026 19:44:58 +0800 Subject: [PATCH 3/5] improved github action --- .github/workflows/android.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 1c96ae5..2bca278 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -46,10 +46,9 @@ jobs: const body = `${marker} ### 🔨 Building Debug APK... - _Compiling latest changes... please wait._
- Current Status + View Status Building on GitHub Actions...
`; @@ -67,7 +66,9 @@ jobs: # We pipe output to a file (build.log) AND to console (tee) so we can read it later - name: Build Debug APK id: build_apk + shell: bash run: | + set -o pipefail ./gradlew assembleDebug --stacktrace | tee build.log # 3. UPLOAD THE APK ARTIFACT @@ -114,16 +115,15 @@ jobs: }); const botComment = comments.data.find(c => c.body.includes(marker)); - let title = status === 'success' ? '✅ Build Successful' : '❌ Build Failed'; + let title = status === 'success' ? '## ✅ Build Successful' : '## ❌ Build Failed'; let downloadSection = status === 'success' - ? `### 📥 [Download Debug APK](${runUrl}) - **⚠️ WARNING:** This is a **DEBUG** build. It is signed with a debug key. - - Do not install this unless you are testing this PR. - - You will need to uninstall Release version first. - - To download: Click the link above, scroll down to **Artifacts**. - ` - : `### ⛔ Build Failed - The compiler encountered errors. See logs below.`; + ? \`**Debug APK Ready** + + [Download from Artifacts](${runUrl}) + + > **Note:** You may need to uninstall the existing version before installing this debug build. + \` + : \`**The build encountered errors.** See the logs below for details.\`; const body = `${marker} ${title} @@ -131,14 +131,12 @@ jobs: ${downloadSection}
- 📝 Build Logs (Last 150 lines) + Build Logs \`\`\`text ${logs} \`\`\`
- - _Updated: ${new Date().toISOString()}_ `; if (botComment) { From 1c427fffce962a32f09a693e0408feee2059bb23 Mon Sep 17 00:00:00 2001 From: JoshAtticus Date: Mon, 16 Feb 2026 19:48:49 +0800 Subject: [PATCH 4/5] improved workflows --- .github/workflows/android.yml | 23 +++++++++-- .github/workflows/pr-commands.yml | 67 +++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/pr-commands.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 2bca278..c026ce8 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -6,6 +6,11 @@ on: paths-ignore: - '**.md' - 'fastlane/**' + workflow_dispatch: + inputs: + pr_number: + description: 'PR Number' + required: true # We need permission to write comments on the PR permissions: @@ -19,6 +24,15 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 + - name: Determine PR Number + id: pr_context + run: | + if [ "${{ github.event_name }}" == "pull_request" ]; then + echo "PR_NUMBER=${{ github.event.number }}" >> $GITHUB_ENV + else + echo "PR_NUMBER=${{ inputs.pr_number }}" >> $GITHUB_ENV + fi + - name: Set up JDK 17 uses: actions/setup-java@v4 with: @@ -32,11 +46,13 @@ jobs: # 1. FIND OR CREATE THE INITIAL COMMENT - name: Post "Building" Comment uses: actions/github-script@v7 + env: + PR_NUMBER: ${{ env.PR_NUMBER }} with: script: | const marker = ''; const { owner, repo } = context.repo; - const issue_number = context.issue.number; + const issue_number = parseInt(process.env.PR_NUMBER); // Find existing comment const comments = await github.rest.issues.listComments({ @@ -76,7 +92,7 @@ jobs: if: success() uses: actions/upload-artifact@v4 with: - name: compressor-debug-pr-${{ github.event.number }} + name: compressor-debug-pr-${{ env.PR_NUMBER }} path: app/build/outputs/apk/debug/app-debug.apk retention-days: 5 @@ -100,11 +116,12 @@ jobs: LOGS: ${{ steps.process_logs.outputs.LOG_CONTENT }} RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} STATUS: ${{ job.status }} + PR_NUMBER: ${{ env.PR_NUMBER }} with: script: | const marker = ''; const { owner, repo } = context.repo; - const issue_number = context.issue.number; + const issue_number = parseInt(process.env.PR_NUMBER); const logs = process.env.LOGS; const runUrl = process.env.RUN_URL; const status = process.env.STATUS; diff --git a/.github/workflows/pr-commands.yml b/.github/workflows/pr-commands.yml new file mode 100644 index 0000000..a05bc3d --- /dev/null +++ b/.github/workflows/pr-commands.yml @@ -0,0 +1,67 @@ +name: PR Commands + +on: + issue_comment: + types: [created] + +permissions: + pull-requests: read + issues: read + actions: write + contents: read + +jobs: + command-handler: + runs-on: ubuntu-latest + if: github.event.issue.pull_request && contains(github.event.comment.body, '/rebuild') + steps: + - name: Check Permission and Trigger Build + uses: actions/github-script@v7 + with: + script: | + const commenter = context.payload.comment.user.login; + const prCreator = context.payload.issue.user.login; + const owner = context.repo.owner; + const body = context.payload.comment.body; + + console.log(`User: ${commenter}, PR Creator: ${prCreator}, Owner: ${owner}`); + + // 1. Authorization Check + if (commenter !== prCreator && commenter !== owner) { + console.log(`❌ User ${commenter} is not authorized.`); + await github.rest.reactions.createForIssueComment({ + owner, repo: context.repo.repo, + comment_id: context.payload.comment.id, + content: '-1' + }); + return; + } + + console.log('✅ User is authorized.'); + + // 2. React to the comment (Thumbs up) + await github.rest.reactions.createForIssueComment({ + owner, repo: context.repo.repo, + comment_id: context.payload.comment.id, + content: '+1' + }); + + // 3. Get PR details to find the branch + const { data: pr } = await github.rest.pulls.get({ + owner, + repo: context.repo.repo, + pull_number: context.issue.number + }); + + console.log(`Triggering rebuild for branch: ${pr.head.ref}`); + + // 4. Trigger the main android.yml workflow + await github.rest.actions.createWorkflowDispatch({ + owner, + repo: context.repo.repo, + workflow_id: 'android.yml', + ref: pr.head.ref, // IMPORTANT: Run on the PR's branch + inputs: { + pr_number: context.issue.number.toString() + } + }); From b688096fcaef494ea4d4776a74881ea87bfcc8e0 Mon Sep 17 00:00:00 2001 From: JoshAtticus Date: Mon, 16 Feb 2026 19:50:24 +0800 Subject: [PATCH 5/5] shart --- .github/workflows/pr-commands.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-commands.yml b/.github/workflows/pr-commands.yml index a05bc3d..0bd27f4 100644 --- a/.github/workflows/pr-commands.yml +++ b/.github/workflows/pr-commands.yml @@ -5,8 +5,8 @@ on: types: [created] permissions: - pull-requests: read - issues: read + pull-requests: write + issues: write actions: write contents: read