Skip to content

Comments

Pull#42

Draft
salman-dev-app wants to merge 16 commits intofyaz05:mainfrom
salman-dev-app:main
Draft

Pull#42
salman-dev-app wants to merge 16 commits intofyaz05:mainfrom
salman-dev-app:main

Conversation

@salman-dev-app
Copy link

@salman-dev-app salman-dev-app commented Feb 20, 2026

Pull

Summary by CodeRabbit

  • Documentation

    • Updated project title and reorganized README with a streamlined Koyeb deployment guide, replacing extensive configuration documentation.
  • Chores

    • Removed Heroku deployment configuration.
    • Added Koyeb deployment configuration file with environment variables for cloud deployment.
    • Updated configuration and template formatting.

@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

📝 Walkthrough

Walkthrough

This PR migrates the project's deployment platform from Heroku to Koyeb. It removes Heroku-specific configurations (Procfile and heroku.yml), adds a new Koyeb deployment configuration file with service and environment variable declarations, and updates the README documentation to reflect the new deployment workflow. Minor whitespace changes are also included.

Changes

Cohort / File(s) Summary
Heroku Configuration Removal
Procfile, heroku.yml
Deleted Procfile web process definition and removed Docker-based build configuration from heroku.yml, eliminating Heroku deployment setup.
Koyeb Deployment Configuration
koyeb.yaml
Added new Koyeb deployment manifest specifying a nano-instance service on port 8080 with eight environment variable declarations (BOT_TOKEN, API_ID, API_HASH, BIN_CHANNEL, DATABASE_URL, FQDN, OWNER_ID).
Documentation Update
README.md
Updated project title to "⚡ Thunder modified" and replaced extensive Getting Started/Configuration sections with a streamlined "Deploy to Koyeb" deployment guide outlining cloud deployment workflow.
Minor Formatting Changes
config.env, Thunder/template/req.html
Added blank line after PING_INTERVAL configuration and appended trailing blank line after closing HTML tag.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Hop away from Heroku's cloud,
To Koyeb, swift and proud!
Config files leap and play,
A new deployment comes today,
Thunder modified, ready to fly!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The pull request title 'Pull' is vague and generic, providing no meaningful information about the changeset. Replace with a descriptive title that summarizes the main change, such as 'Migrate deployment configuration from Heroku to Koyeb' or 'Update project infrastructure and documentation'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@salman-dev-app
Copy link
Author

Play ll

@salman-dev-app salman-dev-app marked this pull request as draft February 20, 2026 16:46
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
config.env (1)

1-3: ⚠️ Potential issue | 🟡 Minor

Update the stale comment on Line 2.

The comment still reads "Rename this file to config.env before using", but the file is already named config.env. Since config.env is properly listed in .gitignore, the template is already protected from accidental secret commits. Update the comment to reflect the current filename (e.g., "This is a template file; copy to config.env and configure") or rename the file to config.env.example for clarity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config.env` around lines 1 - 3, The header comment is stale: it currently
says "Rename this file to config.env before using" even though the file is
already named config.env; update that line to a clearer template instruction
such as "This is a template file; copy to config.env and configure" (or
alternatively rename the file to config.env.example); modify the top comment
block (the two comment lines shown in the diff) to reflect the chosen approach
so the template intent is correct and consistent with .gitignore.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@koyeb.yaml`:
- Around line 8-22: Add the missing environment entries for PORT and
OWNER_USERNAME to the env list in koyeb.yaml so runtime values used by the web
server bind (PORT used in Thunder.__main__ main/startup web binding) and the
startup display (OWNER_USERNAME shown in Thunder.__main__ on startup) are
explicitly declared; add two env items with name: PORT and name: OWNER_USERNAME
(values can be empty strings) alongside the existing BOT_TOKEN, API_ID,
API_HASH, BIN_CHANNEL, DATABASE_URL, FQDN, and OWNER_ID entries.
- Around line 1-22: koyeb.yaml is missing required env vars referenced by
config.env; add OWNER_USERNAME, HAS_SSL, PORT, and NO_PORT to the env list so
the service gets those values at runtime (use OWNER_USERNAME with empty string,
HAS_SSL="False", PORT="8080", NO_PORT="True" per config expectations); update
the service block's env entries (alongside BOT_TOKEN, API_ID, API_HASH,
BIN_CHANNEL, DATABASE_URL, FQDN, OWNER_ID) to include these four variables so
the bot startup logic that reads OWNER_USERNAME, HAS_SSL, PORT, and NO_PORT
finds them.

In `@README.md`:
- Around line 1-4: Update the README branding so it matches the target
repository instead of the fork: replace the header text "⚡ Thunder modified" and
any fork-specific references (e.g., the image alt "Thunder Logo") with the
correct project name or a neutral title for this repo (e.g., "FileToLink" or a
generic project title), and remove the word "modified" or other fork-specific
language so the README accurately represents the target repository.
- Around line 31-53: The README replacement removed comprehensive setup docs and
only leaves the Koyeb deploy; restore the missing sections rather than
overwriting them by re-adding the prior "Local Installation", "Configuration
Reference" (detailing env vars like API_ID, API_HASH, BOT_TOKEN, BIN_CHANNEL,
OWNER_ID, DATABASE_URL, FQDN), "Docker / Local Docker Compose", "Advanced
Features" and "Multi-platform Deployment" sections and then append the existing
"## Production Deployment Guide" / "Deploy to Koyeb" section so users can choose
local, Docker, or cloud deploys; update headings (e.g., "Local Installation",
"Configuration Reference", "Docker Deployment", "Advanced Features") and ensure
the Koyeb instructions remain intact.
- Line 40: Replace the hardcoded fork repository references (e.g., the Koyeb
deploy URL containing "salman-dev-app/FileToLink" and the issue links on lines
64–65) with repository-relative or upstream-safe references: either change
"salman-dev-app/FileToLink" to the correct upstream owner "fyaz05/FileToLink" or
(preferably) use relative links/variables (e.g., omit the owner and use the
current repo path or GitHub placeholders) so the deploy button and issue links
point to the target repo when merged; update the README.md occurrences of the
exact string "salman-dev-app/FileToLink" and the issue link URLs accordingly.

---

Outside diff comments:
In `@config.env`:
- Around line 1-3: The header comment is stale: it currently says "Rename this
file to config.env before using" even though the file is already named
config.env; update that line to a clearer template instruction such as "This is
a template file; copy to config.env and configure" (or alternatively rename the
file to config.env.example); modify the top comment block (the two comment lines
shown in the diff) to reflect the chosen approach so the template intent is
correct and consistent with .gitignore.

Comment on lines +1 to +22
name: filetolink
service:
name: filetolink
instance:
type: nano
ports:
- port: 8080
env:
- name: BOT_TOKEN
value: ""
- name: API_ID
value: ""
- name: API_HASH
value: ""
- name: BIN_CHANNEL
value: ""
- name: DATABASE_URL
value: ""
- name: FQDN
value: ""
- name: OWNER_ID
value: "" No newline at end of file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if a Dockerfile or Procfile exists
echo "=== Looking for Dockerfile ==="
fd -t f 'Dockerfile' 2>/dev/null && echo "Found Dockerfile" || echo "No Dockerfile found"

echo ""
echo "=== Looking for Procfile ==="
fd -t f 'Procfile' 2>/dev/null && echo "Found Procfile" || echo "No Procfile found"

echo ""
echo "=== Current koyeb.yaml content ==="
cat koyeb.yaml

echo ""
echo "=== Looking for config.env to check required env vars ==="
fd -t f 'config.env' 2>/dev/null && echo "Found config.env" || echo "No config.env found"

Repository: fyaz05/FileToLink

Length of output: 641


🏁 Script executed:

#!/bin/bash
# If config.env exists, check its REQUIRED section
if fd -t f 'config.env' 2>/dev/null | grep -q config.env; then
  echo "=== config.env REQUIRED section ==="
  cat config.env | head -50
else
  echo "config.env not found, checking for config examples"
  fd -t f '*.env*' 2>/dev/null
fi

echo ""
echo "=== Check git history to confirm Procfile removal ==="
git log --oneline -n 20 -- Procfile 2>/dev/null || echo "No Procfile in git history"

Repository: fyaz05/FileToLink

Length of output: 166


🏁 Script executed:

#!/bin/bash
echo "=== Procfile content ==="
cat Procfile

echo ""
echo "=== config.env content ==="
cat config.env

echo ""
echo "=== Checking for .env.example or similar ==="
fd -t f '\.env' 2>/dev/null

Repository: fyaz05/FileToLink

Length of output: 3466


🏁 Script executed:

#!/bin/bash
echo "=== Git ls-files for Procfile ==="
git ls-files | grep -i procfile || echo "Procfile not in git"

echo ""
echo "=== Files at repo root ==="
git ls-files --cached | head -20

echo ""
echo "=== Dockerfile content ==="
cat Dockerfile

Repository: fyaz05/FileToLink

Length of output: 1090


Add missing required environment variables to koyeb.yaml.

The koyeb.yaml is missing four environment variables marked as required in config.env: OWNER_USERNAME, HAS_SSL, PORT, and NO_PORT. These must be added for the bot to function correctly.

  env:
    - name: BOT_TOKEN
      value: ""
    - name: API_ID
      value: ""
    - name: API_HASH
      value: ""
    - name: BIN_CHANNEL
      value: ""
    - name: DATABASE_URL
      value: ""
    - name: FQDN
      value: ""
    - name: OWNER_ID
      value: ""
    - name: OWNER_USERNAME
      value: ""
    - name: HAS_SSL
      value: "False"
    - name: PORT
      value: "8080"
    - name: NO_PORT
      value: "True"

The Dockerfile specifies the correct start command (python -m Thunder), so Koyeb will auto-detect and use it during deployment. The explicit run directive is optional.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@koyeb.yaml` around lines 1 - 22, koyeb.yaml is missing required env vars
referenced by config.env; add OWNER_USERNAME, HAS_SSL, PORT, and NO_PORT to the
env list so the service gets those values at runtime (use OWNER_USERNAME with
empty string, HAS_SSL="False", PORT="8080", NO_PORT="True" per config
expectations); update the service block's env entries (alongside BOT_TOKEN,
API_ID, API_HASH, BIN_CHANNEL, DATABASE_URL, FQDN, OWNER_ID) to include these
four variables so the bot startup logic that reads OWNER_USERNAME, HAS_SSL,
PORT, and NO_PORT finds them.

Comment on lines +8 to +22
env:
- name: BOT_TOKEN
value: ""
- name: API_ID
value: ""
- name: API_HASH
value: ""
- name: BIN_CHANNEL
value: ""
- name: DATABASE_URL
value: ""
- name: FQDN
value: ""
- name: OWNER_ID
value: "" No newline at end of file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, let's locate and examine the config.env file to see REQUIRED SETTINGS
find . -name "config.env" -type f

Repository: fyaz05/FileToLink

Length of output: 73


🏁 Script executed:

# Check the structure of the repository
git ls-files | head -30

Repository: fyaz05/FileToLink

Length of output: 804


🏁 Script executed:

# Look for config.env and examine its REQUIRED SETTINGS section
rg -n "REQUIRED" --type py --type txt -B 2 -A 15 | head -100

Repository: fyaz05/FileToLink

Length of output: 43


🏁 Script executed:

# Read the config.env file to see what variables are defined
cat ./config.env

Repository: fyaz05/FileToLink

Length of output: 3308


🏁 Script executed:

# Search for OWNER_USERNAME usage in the codebase
rg -n "OWNER_USERNAME" -C 3

Repository: fyaz05/FileToLink

Length of output: 1065


🏁 Script executed:

# Search for PORT environment variable usage
rg -n "PORT" --type py -C 2

Repository: fyaz05/FileToLink

Length of output: 3382


Add missing required environment variables to koyeb.yaml.

Both OWNER_USERNAME and PORT are listed in the REQUIRED SETTINGS section of config.env and are actively used at runtime. PORT is used to configure the web server binding (Thunder/main.py:162), and OWNER_USERNAME is displayed during startup (Thunder/main.py:200). While both have default fallbacks in the code, they should be explicitly declared in the deployment configuration.

Suggested additions
     - name: OWNER_ID
       value: ""
+    - name: OWNER_USERNAME
+      value: ""
+    - name: PORT
+      value: "8080"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
env:
- name: BOT_TOKEN
value: ""
- name: API_ID
value: ""
- name: API_HASH
value: ""
- name: BIN_CHANNEL
value: ""
- name: DATABASE_URL
value: ""
- name: FQDN
value: ""
- name: OWNER_ID
value: ""
env:
- name: BOT_TOKEN
value: ""
- name: API_ID
value: ""
- name: API_HASH
value: ""
- name: BIN_CHANNEL
value: ""
- name: DATABASE_URL
value: ""
- name: FQDN
value: ""
- name: OWNER_ID
value: ""
- name: OWNER_USERNAME
value: ""
- name: PORT
value: "8080"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@koyeb.yaml` around lines 8 - 22, Add the missing environment entries for PORT
and OWNER_USERNAME to the env list in koyeb.yaml so runtime values used by the
web server bind (PORT used in Thunder.__main__ main/startup web binding) and the
startup display (OWNER_USERNAME shown in Thunder.__main__ on startup) are
explicitly declared; add two env items with name: PORT and name: OWNER_USERNAME
(values can be empty strings) alongside the existing BOT_TOKEN, API_ID,
API_HASH, BIN_CHANNEL, DATABASE_URL, FQDN, and OWNER_ID entries.

Comment on lines +1 to +4
<p align="center">
<img src="https://cdn.jsdelivr.net/gh/fyaz05/Resources@main/FileToLink/Thunder.jpg" alt="Thunder Logo" width="120">
<h1 align="center">⚡ Thunder modified</h1>
</p>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Title and branding reference the fork, not the target repository.

This PR targets fyaz05/FileToLink, but Line 3 brands the project as "⚡ Thunder modified". If merged, the original project's README would confusingly describe itself as a modification.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 1 - 4, Update the README branding so it matches the
target repository instead of the fork: replace the header text "⚡ Thunder
modified" and any fork-specific references (e.g., the image alt "Thunder Logo")
with the correct project name or a neutral title for this repo (e.g.,
"FileToLink" or a generic project title), and remove the word "modified" or
other fork-specific language so the README accurately represents the target
repository.

Comment on lines +31 to +53
## Production Deployment Guide

### Deploy to Koyeb

You can deploy this bot to Koyeb with just a few clicks:

1. Create a [Koyeb account](https://app.koyeb.com/auth/signin)
2. Click the deploy button below:

[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=git&repository=github.com/salman-dev-app/FileToLink&branch=main&name=thunder-bot)

3. Configure the following environment variables in Koyeb:
- `API_ID` - Your Telegram API ID
- `API_HASH` - Your Telegram API Hash
- `BOT_TOKEN` - Your bot token from @BotFather
- `BIN_CHANNEL` - Your storage channel ID
- `OWNER_ID` - Your Telegram user ID
- `DATABASE_URL` - Your MongoDB connection string
- `FQDN` - Your domain or Koyeb app URL
- Other optional variables as needed

4. Click "Deploy" and wait for the deployment to complete
5. Your bot will be available at the URL provided by Koyeb
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Comprehensive setup and configuration documentation has been removed.

The previous README contained detailed sections for local installation, configuration reference, advanced features, and multi-platform deployment. This replacement covers only Koyeb one-click deploy. Users who want to run locally, use Docker, or deploy elsewhere lose all guidance.

Consider preserving the existing documentation sections and appending the Koyeb deployment option rather than replacing everything.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 31 - 53, The README replacement removed comprehensive
setup docs and only leaves the Koyeb deploy; restore the missing sections rather
than overwriting them by re-adding the prior "Local Installation",
"Configuration Reference" (detailing env vars like API_ID, API_HASH, BOT_TOKEN,
BIN_CHANNEL, OWNER_ID, DATABASE_URL, FQDN), "Docker / Local Docker Compose",
"Advanced Features" and "Multi-platform Deployment" sections and then append the
existing "## Production Deployment Guide" / "Deploy to Koyeb" section so users
can choose local, Docker, or cloud deploys; update headings (e.g., "Local
Installation", "Configuration Reference", "Docker Deployment", "Advanced
Features") and ensure the Koyeb instructions remain intact.

1. Create a [Koyeb account](https://app.koyeb.com/auth/signin)
2. Click the deploy button below:

[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=git&repository=github.com/salman-dev-app/FileToLink&branch=main&name=thunder-bot)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Deploy button and issue links are hardcoded to the fork repository.

The Koyeb deploy URL points to salman-dev-app/FileToLink, not fyaz05/FileToLink. If this PR is merged into the upstream repo, users clicking "Deploy to Koyeb" will deploy stale code from the fork. Similarly, Lines 64–65 link issues to the fork.

All repository references should use the target repo or be made relative:

Suggested fix
-[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=git&repository=github.com/salman-dev-app/FileToLink&branch=main&name=thunder-bot)
+[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=git&repository=github.com/fyaz05/FileToLink&branch=main&name=thunder-bot)
-  <a href="https://github.com/salman-dev-app/FileToLink/issues/new">Report Bug</a> •
-  <a href="https://github.com/salman-dev-app/FileToLink/issues/new">Request Feature</a>
+  <a href="https://github.com/fyaz05/FileToLink/issues/new">Report Bug</a> •
+  <a href="https://github.com/fyaz05/FileToLink/issues/new">Request Feature</a>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 40, Replace the hardcoded fork repository references
(e.g., the Koyeb deploy URL containing "salman-dev-app/FileToLink" and the issue
links on lines 64–65) with repository-relative or upstream-safe references:
either change "salman-dev-app/FileToLink" to the correct upstream owner
"fyaz05/FileToLink" or (preferably) use relative links/variables (e.g., omit the
owner and use the current repo path or GitHub placeholders) so the deploy button
and issue links point to the target repo when merged; update the README.md
occurrences of the exact string "salman-dev-app/FileToLink" and the issue link
URLs accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant