{"id":32801710,"url":"https://github.com/programinglive/sentry-resolve","last_synced_at":"2026-01-20T16:50:49.803Z","repository":{"id":321339007,"uuid":"1085442715","full_name":"programinglive/sentry-resolve","owner":"programinglive","description":"resolve but with automation","archived":false,"fork":false,"pushed_at":"2025-10-29T04:06:13.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-29T06:10:59.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/programinglive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"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}},"created_at":"2025-10-29T03:38:52.000Z","updated_at":"2025-10-29T04:06:17.000Z","dependencies_parsed_at":"2025-10-29T06:11:19.073Z","dependency_job_id":"9caa8be7-d28f-491c-b753-d3d2c3104e50","html_url":"https://github.com/programinglive/sentry-resolve","commit_stats":null,"previous_names":["programinglive/sentry-resolve"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/programinglive/sentry-resolve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programinglive%2Fsentry-resolve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programinglive%2Fsentry-resolve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programinglive%2Fsentry-resolve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programinglive%2Fsentry-resolve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/programinglive","download_url":"https://codeload.github.com/programinglive/sentry-resolve/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programinglive%2Fsentry-resolve/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281615822,"owners_count":26531904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"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":[],"created_at":"2025-11-06T06:00:56.590Z","updated_at":"2026-01-20T16:50:49.782Z","avatar_url":"https://github.com/programinglive.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sentry Resolve\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/programinglive/sentry-resolve.svg?style=flat-square)](https://packagist.org/packages/programinglive/sentry-resolve)\n\n\n[![Total Downloads](https://img.shields.io/packagist/dt/programinglive/sentry-resolve.svg?style=flat-square)](https://packagist.org/packages/programinglive/sentry-resolve)\n[![Website](https://img.shields.io/website?url=https%3A%2F%2Fsentry-resolve.netlify.app\u0026label=website)](https://sentry-resolve.netlify.app)\n\nAutomate Sentry issue resolution with PHP commands and CLI tools. This package provides a simple way to fetch, manage, and resolve Sentry issues across any PHP project.\n\n**[📚 Read the Full Documentation](https://sentry-resolve.netlify.app)**\n\n## Features\n\n- 🚀 **Framework Agnostic** - Works with Laravel, Symfony, or any PHP project\n- 📋 **Issue Management** - Pull unresolved issues into a TODO file\n- 🔧 **Bulk Resolution** - Resolve multiple issues at once\n- 🖥️ **CLI Tool** - Standalone command-line interface\n- 🧪 **Well Tested** - Comprehensive test coverage\n- 🤖 **AI Workflow Integration** - Built-in detection for `@programinglive/dev-workflow-mcp-server`\n- 📝 **Flexible Configuration** - Environment-based configuration\n\n## Installation\n\n### Composer Install\n\n```bash\ncomposer require --dev programinglive/sentry-resolve\n```\n\n### Laravel Installation\n\n1. Install the package:\n```bash\ncomposer require --dev programinglive/sentry-resolve\n```\n\n\u003e **Why dev-only?** This package automates fixing Sentry issues during development workflows and is not intended for production environments.\n\n2. Publish the configuration:\n```bash\nphp artisan vendor:publish --tag=sentry-resolve-config\n```\n\n3. Add environment variables to your `.env`:\n```env\nSENTRY_TOKEN=your_sentry_api_token\nSENTRY_ORG=your_organization\nSENTRY_PROJECT=your_project\n```\n\n## Configuration\n\n### Environment Variables\n\n```env\n# Required\nSENTRY_TOKEN=sntrys_eyJpYXQiOjE3...\nSENTRY_ORG=your-organization-slug\nSENTRY_PROJECT=your-project-slug\nSENTRY_DSN=https://examplePublicKey@o0.ingest.sentry.io/0\n\n# Optional (for Laravel integration)\nSENTRY_TRACES_SAMPLE_RATE=1.0\n```\n\n### Getting Sentry Credentials\n\n1. **API Token**: Go to Sentry → User Settings → API Tokens → Create New Token\n   - Required scopes: `project:read`, `event:read`, `issue:read`, `issue:write`\n\n2. **Organization \u0026 Project**: Found in your Sentry project URL\n   - URL: `https://your-org-slug.sentry.io/projects/your-project-slug/`\n   - Organization: `your-org-slug`\n   - Project: `your-project-slug`\n\n## Usage\n\n### Standalone CLI\n\nAfter installation, you can use the CLI tool directly:\n\n```bash\n# Test your configuration\n./vendor/bin/sentry-resolve sentry:debug\n\n# Pull issues\n./vendor/bin/sentry-resolve sentry:pull --limit=10 --sort=freq\n\n# Resolve issues\n./vendor/bin/sentry-resolve sentry:resolve ISSUE-1 ISSUE-2\n\n# Test a token\n./vendor/bin/sentry-resolve sentry:test-token your_token_here\n```\n\n### Laravel Artisan Commands\n\n```bash\n# Test configuration\nphp artisan sentry:debug\n\n# Pull latest issues\nphp artisan sentry:pull --limit=25 --sort=freq\n\n# Resolve specific issues\nphp artisan sentry:resolve ISSUE-1 ISSUE-2\n\n# Test a token\nphp artisan sentry:test-token your_token_here\n```\n\n### PHP Native Usage\n\n```php\n\u003c?php\n\nrequire 'vendor/autoload.php';\n\nuse Mahardhika\\SentryResolve\\SentryClient;\n\n$client = new SentryClient(\n    'your_token',\n    'your_organization', \n    'your_project'\n);\n\n// Get issues\n$issues = $client-\u003egetIssues([\n    'query' =\u003e 'is:unresolved',\n    'limit' =\u003e 25,\n    'sort' =\u003e 'freq'\n]);\n\n// Resolve an issue\n$client-\u003eresolveIssue('ISSUE-1');\n\n// Test token\n$auth = $client-\u003etestToken();\n```\n\n## Available Commands\n\n### `sentry:pull`\n\nFetches unresolved issues from Sentry and generates a `SENTRY_TODO.md` file.\n\n**Options:**\n- `--limit` (-l): Number of issues to fetch (default: 25)\n- `--query` (-q): Sentry search query (default: \"is:unresolved\")\n- `--sort` (-s): Sort order - freq|new|priority|trend|user (default: \"freq\")\n- `--output` (-o): Output file path (default: \"SENTRY_TODO.md\")\n\n**Examples:**\n```bash\n# Pull 10 most frequent issues\nphp artisan sentry:pull --limit=10 --sort=freq\n\n# Pull newest issues in production\nphp artisan sentry:pull --query=\"is:unresolved environment:production\" --sort=new\n\n# Custom output file\nphp artisan sentry:pull --output=PROJECT_TODO.md\n```\n\n### `sentry:resolve`\n\nResolves one or more Sentry issues.\n\n**Arguments:**\n- `identifiers`: One or more issue IDs (e.g., \"ISSUE-1\", \"ISSUE-2\")\n\n**Examples:**\n```bash\n# Resolve single issue\nphp artisan sentry:resolve ISSUE-1\n\n# Resolve multiple issues\nphp artisan sentry:resolve ISSUE-1 ISSUE-2 ISSUE-3\n```\n\n#### Resolution Logging\n\nEvery resolved issue is logged to a rotating log file (daily by default).\n\n**Environment variables:**\n\n- `SENTRY_RESOLVE_LOG_ENABLED` (default: `true`)\n- `SENTRY_RESOLVE_LOG_PATH` (default: `storage/logs` in Laravel or `storage/logs` relative to the package)\n- `SENTRY_RESOLVE_LOG_FREQUENCY` (options: `daily`, `monthly`, `yearly` — default: `daily`)\n- `SENTRY_RESOLVE_LOG_PREFIX` (default: `sentry-resolve`)\n\n**Log filenames:** `{prefix}-{YYYY-MM-DD}.log` (based on frequency).\n\n### `sentry:debug`\n\nTests your Sentry configuration and displays current settings.\n\n**Examples:**\n```bash\nphp artisan sentry:debug\n```\n\n### `sentry:test-token`\n\nTests a specific Sentry token without requiring full configuration.\n\n**Arguments:**\n- `token`: The Sentry API token to test\n\n**Examples:**\n```bash\nphp artisan sentry:test-token sntrys_eyJpYXQiOjE3...\n```\n\n## Workflow Integration\n\n### Daily Workflow\n\n1. **Pull Issues**: Get latest issues from Sentry\n```bash\nphp artisan sentry:pull --limit=10 --sort=freq\n```\n\n2. **Review**: Check the generated `SENTRY_TODO.md`\n3. **Fix**: Create branches and fix issues\n4. **Resolve**: Mark issues as resolved\n```bash\nphp artisan sentry:resolve ISSUE-1 ISSUE-2\n```\n\n### Git Hooks (Optional)\n\nAdd to `.git/hooks/pre-commit`:\n```bash\n#!/bin/bash\n# Check for Sentry TODO\nif [ -f \"SENTRY_TODO.md\" ]; then\n    if grep -q \"Found [1-9]\" SENTRY_TODO.md; then\n        echo \"⚠️  You have unresolved Sentry issues in SENTRY_TODO.md\"\n        echo \"   Please review and fix them before committing\"\n        exit 1\n    fi\nfi\n```\n\n### CI/CD Integration\n\n```yaml\n# GitHub Actions example\n- name: Check Sentry Issues\n  run: |\n    php artisan sentry:pull --limit=5\n    if grep -q \"Found [1-9]\" SENTRY_TODO.md; then\n      echo \"❌ Unresolved Sentry issues found\"\n      cat SENTRY_TODO.md\n      exit 1\n    fi\n```\n\n### AI Development Workflow\n\nSentry Resolve integrates with [`@programinglive/dev-workflow-mcp-server`](https://www.npmjs.com/package/@programinglive/dev-workflow-mcp-server) to help AI assistants follow best practices when fixing issues.\n\nWhen the MCP server is detected in your project, the `sentry:pull` command will automatically display workflow guidance for AI coding assistants. This ensures that every fix follows a standardized path:\n1. Start task\n2. Mark bug fixed\n3. Create tests\n4. Run tests\n5. Document changes\n6. Commit \u0026 Push\n7. Complete task\n\n## Advanced Usage\n\n### Custom Query Examples\n\n```bash\n# Production errors only\nphp artisan sentry:pull --query=\"is:unresolved environment:production level:error\"\n\n# Issues affecting many users\nphp artisan sentry:pull --query=\"is:unresolved user.count:\u003e10\" --sort=user\n\n# Specific time range\nphp artisan sentry:pull --query=\"is:unresolved firstSeen:\u003e2023-01-01\"\n```\n\n### Programmatic Usage\n\n```php\nuse Mahardhika\\SentryResolve\\Commands\\SentryPullCommand;\nuse Symfony\\Component\\Console\\Application;\n\n$app = new Application();\n$client = new SentryClient($token, $org, $project);\n$app-\u003eadd(new SentryPullCommand($client));\n$app-\u003erun();\n```\n\n## Testing\n\n```bash\n# Run tests\ncomposer test\n\n# Run tests with coverage\ncomposer test-coverage\n```\n\n## Configuration File (Laravel)\n\nPublished config file at `config/sentry-resolve.php`:\n\n```php\n\u003c?php\n\nreturn [\n    'token' =\u003e env('SENTRY_TOKEN'),\n    'organization' =\u003e env('SENTRY_ORG'),\n    'project' =\u003e env('SENTRY_PROJECT'),\n    \n    'defaults' =\u003e [\n        'pull' =\u003e [\n            'limit' =\u003e 25,\n            'query' =\u003e 'is:unresolved',\n            'sort' =\u003e 'freq',\n            'output' =\u003e 'SENTRY_TODO.md',\n        ],\n    ],\n];\n```\n\n## Troubleshooting\n\n### Common Issues\n\n**403 Forbidden Error**\n- Check your token scopes\n- Verify organization and project names\n- Ensure token has `issue:write` scope for resolve operations\n\n**No Issues Found**\n- Verify your query syntax\n- Check if issues are already resolved\n- Confirm organization/project access\n\n**Command Not Found (Laravel)**\n- Run `php artisan package:discover`\n- Ensure service provider is registered\n- Check config is published\n\n**`Sentry Resolve is not configured` error**\n- Ensure `SENTRY_TOKEN`, `SENTRY_ORG`, and `SENTRY_PROJECT` are set in your environment or `config/sentry-resolve.php`.\n- Run `php artisan config:clear` followed by `php artisan config:cache` to refresh Laravel's configuration.\n\n### Debug Mode\n\nUse the debug command to troubleshoot configuration:\n\n```bash\nphp artisan sentry:debug\n```\n\nThis will show:\n- Token validity (first 20 characters)\n- Organization and project names\n- Configuration status\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Add tests for new functionality\n4. Ensure all tests pass\n5. Submit a pull request\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines, along with our [Code of Conduct](CODE_OF_CONDUCT.md) and [Security Policy](SECURITY.md).\n\n### Commit \u0026 Release Workflow\n\nWe use [`@programinglive/commiter`](https://www.npmjs.com/package/@programinglive/commiter) to enforce Conventional Commits and automate releases.\n\n- Commit format: `type(scope): subject`\n- Supported types: `feat`, `fix`, `perf`, `refactor`, `docs`, `style`, `test`, `build`, `ci`, `chore`, `revert`\n- Husky hooks run `commitlint` for message validation and `npm test` (alias for `composer test`).\n\nRelease scripts:\n\n```bash\nnpm run release       # auto-detect version bump\nnpm run release:patch # 1.0.0 -\u003e 1.0.1\nnpm run release:minor # 1.0.0 -\u003e 1.1.0\nnpm run release:major # 1.0.0 -\u003e 2.0.0\n```\n\nAfter releasing, push the tag and commits:\n\n```bash\ngit push --follow-tags origin main\n```\n\n## Project Resources\n\n- [Product Requirements Document](docs/PRD.md)\n- [Issue Templates](.github/ISSUE_TEMPLATE)\n- [Pull Request Template](.github/pull_request_template.md)\n\n## License\n\nThis package is open-sourced software licensed under the [MIT license](LICENSE.md).\n\n## Changelog\n\nPlease see [CHANGELOG.md](CHANGELOG.md) for more information on what has changed recently.\n\n## Support\n\n- 📖 [Documentation](https://github.com/programinglive/sentry-resolve)\n- 🐛 [Issue Tracker](https://github.com/programinglive/sentry-resolve/issues)\n- 💬 [Discussions](https://github.com/programinglive/sentry-resolve/discussions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprograminglive%2Fsentry-resolve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprograminglive%2Fsentry-resolve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprograminglive%2Fsentry-resolve/lists"}