{"id":39447346,"url":"https://github.com/geertmeersman/github-scripts","last_synced_at":"2026-01-18T04:26:04.852Z","repository":{"id":297759463,"uuid":"997816501","full_name":"geertmeersman/github-scripts","owner":"geertmeersman","description":"Github Dependabot Auto-Merge \u0026 Scripts container","archived":false,"fork":false,"pushed_at":"2026-01-15T01:00:19.000Z","size":198,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-15T07:50:34.870Z","etag":null,"topics":["github","scripts"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/repository/docker/geertmeersman/github-scripts","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geertmeersman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"geertmeersman","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://www.buymeacoffee.com/geertmeersman"]}},"created_at":"2025-06-07T08:43:21.000Z","updated_at":"2026-01-15T01:00:14.000Z","dependencies_parsed_at":"2025-06-07T09:33:39.244Z","dependency_job_id":"eeaa0b3a-f1ee-42e3-8863-b0e4080c6b2f","html_url":"https://github.com/geertmeersman/github-scripts","commit_stats":null,"previous_names":["geertmeersman/github-scripts"],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/geertmeersman/github-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geertmeersman%2Fgithub-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geertmeersman%2Fgithub-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geertmeersman%2Fgithub-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geertmeersman%2Fgithub-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geertmeersman","download_url":"https://codeload.github.com/geertmeersman/github-scripts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geertmeersman%2Fgithub-scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28529536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","scripts"],"created_at":"2026-01-18T04:26:04.313Z","updated_at":"2026-01-18T04:26:04.836Z","avatar_url":"https://github.com/geertmeersman.png","language":"Python","funding_links":["https://github.com/sponsors/geertmeersman","https://www.buymeacoffee.com/geertmeersman"],"categories":[],"sub_categories":[],"readme":"\n[![maintainer](https://img.shields.io/badge/maintainer-Geert%20Meersman-green?style=for-the-badge\u0026logo=github)](https://github.com/geertmeersman)\n[![buyme_coffee](https://img.shields.io/badge/Buy%20me%20an%20Omer-donate-yellow?style=for-the-badge\u0026logo=buymeacoffee)](https://www.buymeacoffee.com/geertmeersman)\n[![MIT License](https://img.shields.io/github/license/geertmeersman/github-scripts?style=for-the-badge)](https://github.com/geertmeersman/github-scripts/blob/main/LICENSE)\n\n[![GitHub issues](https://img.shields.io/github/issues/geertmeersman/github-scripts)](https://github.com/geertmeersman/github-scripts/issues)\n[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/geertmeersman/github-scripts.svg)](http://isitmaintained.com/project/geertmeersman/github-scripts)\n[![Percentage of issues still open](http://isitmaintained.com/badge/open/geertmeersman/github-scripts.svg)](http://isitmaintained.com/project/geertmeersman/github-scripts)\n[![PRs Welcome](https://img.shields.io/badge/PRs-Welcome-brightgreen.svg)](https://github.com/geertmeersman/github-scripts/pulls)\n\n[![github release](https://img.shields.io/github/v/release/geertmeersman/github-scripts?logo=github)](https://github.com/geertmeersman/github-scripts/releases)\n[![github release date](https://img.shields.io/github/release-date/geertmeersman/github-scripts)](https://github.com/geertmeersman/github-scripts/releases)\n[![github last-commit](https://img.shields.io/github/last-commit/geertmeersman/github-scripts)](https://github.com/geertmeersman/github-scripts/commits)\n[![github contributors](https://img.shields.io/github/contributors/geertmeersman/github-scripts)](https://github.com/geertmeersman/github-scripts/graphs/contributors)\n[![github commit activity](https://img.shields.io/github/commit-activity/y/geertmeersman/github-scripts?logo=github)](https://github.com/geertmeersman/github-scripts/commits/main)\n\n![Docker Pulls](https://img.shields.io/docker/pulls/geertmeersman/github-scripts)\n![Docker Image Version](https://img.shields.io/docker/v/geertmeersman/github-scripts?label=docker%20image%20version)\n\n\n\n# 🔄 GitHub Scripts Dashboard\n\nA Dockerized automation suite to manage GitHub workflows like auto-merging Dependabot PRs and sending daily PR reports — complete with a web interface, cron integration, and notifications.\n\n---\n\n## 📆 Overview\n\nThis container:\n\n* 🧠 Automatically **merges Dependabot PRs**\n* 📧 **Emails you** a daily **PR report** (PRs authored/assigned/mentioning you)\n* 🖥️ Exposes a **Flask dashboard** (on port 80) to manually trigger/monitor scripts\n* 🔁 Runs on **cron** internally (02:00 and 06:00)\n* 📨 Sends **email + Telegram** notifications\n* 📌 Logs all activity to `/var/log/github-scripts/`\n\nBuilt and maintained by [Geert Meersman](https://github.com/gmeersman)\n\n---\n\n## 🧠 Features\n\n| Feature                    | Description                                            |\n| -------------------------- | ------------------------------------------------------ |\n| 🔁 Auto-Merge              | Merges eligible Dependabot PRs using GitHub API        |\n| 📧 PR Report Emails        | Sends daily HTML summary of PRs authored/assigned/etc. |\n| 🖥️ Web UI                 | Run and view scripts via browser (port 80)             |\n| 🥐 Cron-Based Execution    | Auto-runs at 2:00 and 6:00 UTC                         |\n| 🔔 Email \u0026 Telegram Alerts | Optional notifications on success/failure              |\n| ❤️ Lightweight Container   | Based on `python:3.11-slim`                            |\n\n---\n\n## 📂 File Structure\n\n```\n/scripts/github/\n├── auto_merge_prs.py            # Script: merge PRs\n├── report_open_prs.py           # Script: send PR report\n├── notify_utils.py              # Utilities: Email \u0026 Telegram\n├── report_utils.py              # Utilities: HTML report wrapper\n├── scripts.json                 # Metadata for dashboard\n\n/scripts/container/\n├── cron_wrapper.py              # Wrapper: logs script + error output\n├── describe_cron.py             # Describes cron jobs at startup\n├── healthcheck.sh               # Healthcheck used by Docker\n\n/web/\n└── web_interface.py             # Flask dashboard (port 80)\n\n/cron/\n└── cronjob                      # All cron job entries\n\n/docker-compose/\n└── compose.yml                  # Docker compose config\n\nentrypoint.sh                    # Starts cron + Flask via Gunicorn\nDockerfile\nVERSION\n```\n\n---\n\n## ⚙️ Environment Variables (`.env`)\n\n```env\n# Web\nWEB_PORT=80\n\n# GitHub\nGITHUB_USER=\u003cyour-github-user\u003e\nGITHUB_TOKEN=\u003cyour-token\u003e\nMERGE_METHOD=squash\n\n# Email (optional)\nSMTP_USER=\u003cyour-user\u003e\nSMTP_PWD=\u003cyour-password\u003e\nSMTP_SERVER=\u003csmtp-server\u003e\nSMTP_PORT=587\nEMAIL_FROM=\u003cemail-from\u003e\nEMAIL_TO=\u003cemail-to\u003e\n\n# Telegram (optional)\nTELEGRAM_BOT_ID=\u003cyour-bot-id\u003e\nTELEGRAM_CHAT_ID=\u003cyour-chat-id\u003e\n\n# Volume path\nLOG_VOLUME=\u003cpath-for-log-mount\u003e\n```\n\n---\n\n## 🚪 Running It\n\n### 🔧 Build Image\n\n```bash\ndocker build -t github-scripts .\n```\n\n### 🚀 Run Container\n\n```bash\ndocker run -d \\\n  --env-file .env \\\n  --name github-scripts \\\n  -p 80:80 \\\n  github-scripts\n```\n\nThe dashboard will be available at: [http://localhost](http://localhost)\n\n---\n\n## ⏰ Cron Schedule (Inside Container)\n\n| Time (UTC) | Script                  | Log File                                                 |\n| ---------- | ----------------------- | -------------------------------------------------------- |\n| 02:00      | `auto_merge_prs` | `/var/log/github-scripts/auto_merge_prs_cron.log` |\n| 06:00      | `report_open_prs`       | `/var/log/github-scripts/report_open_prs_cron.log`       |\n\nEach job is executed through `cron_wrapper.py`, which logs stdout and stderr.\n\n---\n\n## 📨 Notifications\n\n* **Email**: Sent using SMTP config (see `.env`)\n* **Telegram**: Optional webhook alert for job success/failure\n\nIf credentials are missing, notification modules gracefully skip execution.\n\n---\n\n## ♻️ Entrypoint Behavior\n\nOn container start:\n\n1. ✅ Environment is dumped to `/env.sh`\n2. ⏰ Cron daemon starts\n3. 📜 Cron jobs are described via `describe_cron.py`\n4. 🌐 Flask app is launched on port `80` using Gunicorn\n\nLogs and errors are automatically routed for cron jobs and can be inspected using:\n\n```bash\ndocker exec -it github-scripts tail -n 100 /var/log/github-scripts/*.log\n```\n\n---\n\n## ✅ Healthcheck\n\nDocker health check runs via `/healthcheck.sh`, which confirms the Flask UI is up.\n\n```bash\ncurl http://localhost/health\n```\n\n---\n\n## 👤 Author\n\nGeert Meersman — [@gmeersman](https://github.com/gmeersman)\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeertmeersman%2Fgithub-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeertmeersman%2Fgithub-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeertmeersman%2Fgithub-scripts/lists"}