{"id":24344819,"url":"https://github.com/remrkabledev/gh-notifications-automation","last_synced_at":"2026-05-17T15:06:33.100Z","repository":{"id":272639338,"uuid":"917269384","full_name":"reMRKableDev/gh-notifications-automation","owner":"reMRKableDev","description":"GH Automation that periodically checks notifications. It filters out merged or closed PRs/issues and marks them as \"done\"","archived":false,"fork":false,"pushed_at":"2025-02-27T14:43:19.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T23:43:37.342Z","etag":null,"topics":["automation","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/reMRKableDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-15T17:11:37.000Z","updated_at":"2025-02-27T14:43:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"cae8826b-1644-427d-b5e5-99ff5d01d0b0","html_url":"https://github.com/reMRKableDev/gh-notifications-automation","commit_stats":null,"previous_names":["remrkabledev/gh-notifications-automation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reMRKableDev/gh-notifications-automation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reMRKableDev%2Fgh-notifications-automation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reMRKableDev%2Fgh-notifications-automation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reMRKableDev%2Fgh-notifications-automation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reMRKableDev%2Fgh-notifications-automation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reMRKableDev","download_url":"https://codeload.github.com/reMRKableDev/gh-notifications-automation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reMRKableDev%2Fgh-notifications-automation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33143276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["automation","nodejs"],"created_at":"2025-01-18T09:56:10.330Z","updated_at":"2026-05-17T15:06:33.068Z","avatar_url":"https://github.com/reMRKableDev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Notifications Automation 🚀\n\n[![Mark Notifications as Read](https://github.com/reMRKableDev/gh-notifications-automation/actions/workflows/auto-mark-read.yml/badge.svg)](https://github.com/reMRKableDev/gh-notifications-automation/actions/workflows/auto-mark-read.yml)\n[![tests](https://github.com/reMRKableDev/react-omdb-api/actions/workflows/test-coverage.yml/badge.svg)](https://github.com/reMRKableDev/react-omdb-api/actions/workflows/test-coverage.yml)\n[![codecov](https://codecov.io/gh/reMRKableDev/gh-notifications-automation/graph/badge.svg?token=ZcOwgC81Pw)](https://codecov.io/gh/reMRKableDev/gh-notifications-automation)\n\nThis repo contains a script that automates the process of checking GitHub notifications and marking merged or closed PRs/issues as **_\"read.\"_**\n\nThe script uses the GitHub API to streamline the workflow for developers managing large volumes of notifications.\n\n## 🔧 Features\n\n- Automatically fetches all unread GitHub notifications.\n- Filters notifications for:\n  - Closed Issues\n  - Merged Pull Requests\n- Marks processed notifications as \"read.\"\n- Skips notifications for organization-owned repositories (processes only personal repositories).\n- Fully automated via GitHub Actions.\n\n## 🚀 How It Works\n\n1. The script fetches unread notifications using the GitHub API.\n2. It filters notifications:\n   - Only considers your personal repositories (skips organization-owned repos).\n   - Processes notifications related to Pull Requests or Issues.\n   - Checks if the PR/Issue is closed or merged.\n3. Marks filtered notifications as done via the GitHub API.\n\n## 🔑 Prerequisites\n\n- Node.js (`lts` version)\n- GitHub Personal Access Token with `notifications` \u0026 `repo` scope\n- `npm` or `yarn` package manager\n\n## 🛠️ Setup\n\n### 1. Clone this repo\n\n```bash\ngit clone https://github.com/your-username/github-notifications-automation.git\ncd github-notifications-automation\n```\n\n### 2. Install dependencies\n\n```bash\n# Using yarn\nyarn install\n\n# Using npm\nnpm install\n```\n\n### 3. Set Up Environment Variables\n\nCreate a `.env` file in the project root:\n\n```plaintext\nGH_PAT=your-personal-access-token\nGH_USERNAME=your-github-username\n```\n\n**Note:** You can generate a Personal Access Token (PAT) with the notifications scope in your GitHub account settings.\n\n### 4. Run Script Locally\n\n```bash\n# Using yarn\nyarn start\n\n# Using npm\nnpm start\n```\n\n## 📜 Automate with GitHub Actions\n\nThis repo includes a GitHub Actions workflow to run the script periodically in the cloud.\n\n### How to Set Up the Workflow\n\n1. Add the following GitHub Secrets to your repository:\n   - `GH_PAT` → Your GitHub Personal Access Token.\n   - `GH_USERNAME` → Your GitHub username.\n2. The included workflow (`auto-mark-done.yml`) will:\n   - Run the automation every hour.\n   - Process notifications and mark them as **_\"done.\"_**\n\n## 🚨 Testing\n\nJest is used for testing the GitHub API helper functions and core logic.\n\nRun the tests using:\n\n```bash\n# Using yarn\nyarn test\n\n# Using npm\nnpm test\n```\n\nRun tests with coverage:\n\n```bash\n# Using yarn\nyarn coverage\n\n# Using npm\nnpm run coverage\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please read the [CONTRIBUTING GUIDE](CONTRIBUTING) for details on the code of conduct and the process for submitting pull requests.\n\n## 📝 License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n\n---\n\nMade with ❤️ by [reMRKable Dev](https://remrkabledev.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremrkabledev%2Fgh-notifications-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremrkabledev%2Fgh-notifications-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremrkabledev%2Fgh-notifications-automation/lists"}