Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 30, 2025

The Cloudflare Worker uses only Python standard library modules. All main dependencies were for the legacy Flask app and slack-machine plugins which are no longer needed.

Removed Dependencies

  • slack-machine, requests, python-dotenv, gitpython, slackeventsapi, slack-sdk, beautifulsoup4

Removed Files

  • Legacy Flask app: app.py, wsgi.py
  • slack-machine plugins: src/lettuce/plugins/, src/local_settings.py
  • Commented-out tests: tests/plugins/, tests/test_welcome_plugin.py
  • Legacy config: manifest.yaml, .env.sample, .secrets.sample

Updated

  • pyproject.toml: Removed deps, added package-mode = false
  • poetry.lock: Regenerated with dev dependencies only
  • README.md: Updated project structure
  • cloudflare-worker/worker.py: Now loads welcome message from welcome_message.txt file instead of hardcoded constant

Preserved

  • scripts/scrape_stats.py with its own requirements.txt (used by GitHub Actions)
  • All dev/test dependencies (pytest, ruff)
  • Cloudflare Worker code (cloudflare-worker/)
  • welcome_message.txt: Kept in root and copied to cloudflare-worker/ for use by the worker
Original prompt

Remove slack-machine and any packages not needed for the cloudflare worker


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 30, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
blt-lettuce 8a2c0b2 Nov 30 2025, 01:44 AM

Copilot AI changed the title [WIP] Remove slack-machine and unnecessary packages for Cloudflare worker Remove slack-machine and packages not needed for Cloudflare Worker Nov 30, 2025
Copilot AI requested a review from DonnieBLT November 30, 2025 01:02
@DonnieBLT
Copy link
Contributor

@copilot please keep the welcome message and use that for the cloudflare worker

Copy link
Contributor Author

Copilot AI commented Nov 30, 2025

@copilot please keep the welcome message and use that for the cloudflare worker

Restored welcome_message.txt and updated the Cloudflare Worker to load the message from this file instead of having it embedded in the code. The welcome message file is now in both the root directory and cloudflare-worker/ directory. Commit: 8a2c0b2

@DonnieBLT
Copy link
Contributor

@copilot please fix the conflicts

Copy link
Contributor Author

Copilot AI commented Dec 2, 2025

@copilot please fix the conflicts

I'm unable to fix merge conflicts directly as I cannot use git rebase or merge commands. The conflicts are in poetry.lock and pyproject.toml due to recent changes on main (pydantic was added).

To resolve this, please run locally:

git checkout copilot/remove-slack-machine-packages
git fetch origin main
git merge origin/main
# Resolve conflicts by keeping the version without the dependencies
# In pyproject.toml: keep only `python = "^3.10"` under [tool.poetry.dependencies]
poetry lock  # regenerate poetry.lock
git add .
git commit -m "Resolve merge conflicts with main"
git push

Alternatively, you can close this PR and I can create a fresh one from the current main branch.

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants