phntmxyz / pr_todo_checker

3 stars 0 forks source link

Detect existing todos not found in PR #4

Open madebycaliper opened 2 days ago

madebycaliper commented 2 days ago

Hey there thanks for making this action.

In trying to configure this in my CI I'm finding that it only adds comments/detects todos found in the PR diff/comparison. Is there any way to configure it to look through the entire repo? This would be really helpful for existing codebases (like mine) that are getting this setup after lots of todo stragglers have already been forgotten.

passsy commented 2 days ago

You could create a branch at your root commit init and then create a PR from your main branch into init. It should create a diff of your entire repo, finding all TODOs

madebycaliper commented 2 days ago

thanks for the quick reply @passsy . That's a good recommendation. instead I just made slight mods to all the todos in my repo and are addressing them currently one by one. That said, I installed this action and it started failing and I'm not able to debug so I've moved on to other solutions.

passsy commented 1 day ago

can you share the logs with us?

madebycaliper commented 10 hours ago

@passsy let me know if you need anything else to help debug

Run phntmxyz/pr_todo_checker@v1
  with:
    token: ***
    exclude: *.md
  **/config/*.yml

    comment_on_todo: true
    comment_body: "A new Todo was discovered.\\n{todo}\\n\\n"

    comment_checkbox: Ignore
    custom_todo_matcher: {'php': ['//@', '// @','//','/ * ', '/*']}
  env:
    COMPOSER_PROCESS_TIMEOUT: 0
    COMPOSER_NO_INTERACTION: 1
    COMPOSER_NO_AUDIT: 1
Is comment change: false
Todos: [{"filename":"app/Actions/NewFiberWorkSiteSetup.php","line":36,"content":"TODO: Change this from factory to create to prevent side effects","isAdded":false},{"filename":"app/Actions/NewFiberWorkSiteSetup.php","line":36,"content":"todo: Change this from factory to create to prevent side effects","isAdded":true},{"filename":"app/Actions/NewFiberWorkSiteSetup.php","line":44,"content":"todo: implement event sourced version of this","isAdded":false},{"filename":"app/Actions/NewFiberWorkSiteSetup.php","line":44,"content":"todo (es): implement event sourced version of this","isAdded":true},{"filename":"app/Data/Knack/WorkSiteData.php","line":115,"content":"todo swap this out","isAdded":false},{"filename":"app/Data/Knack/WorkSiteData.php","line":115,"content":"todo (ES) swap this out","isAdded":true},{"filename":"app/Enums/JobStatus.php","line":[2](https://github.com/{REPO_NAME_REDACTED}/actions/runs/11484107217/job/31961096207#step:9:2)0,"content":"TODO (ES): Remove all below. Just here to allow import to succeed","isAdded":false},{"filename":"app/Enums/JobStatus.php","line":20,"content":"todo (ES): Remove all below. Just here to allow import to succeed","isAdded":true},{"filename":"app/Enums/JobType.php","line":16,"content":"TODO: Remove this after import","isAdded":false},{"filename":"app/Enums/JobType.php","line":16,"content":"todo: Remove this after import","isAdded":true},{"filename":"app/Enums/WorkType.php","line":24,"content":"TODO: remove after import is complete","isAdded":false},{"filename":"app/Enums/WorkType.php","line":24,"content":"todo (ES): remove after import is complete","isAdded":true},{"filename":"app/Events/DailyReportReassigned.php","line":[3](https://github.com/{REPO_NAME_REDACTED}/actions/runs/11484107217/job/31961096207#step:9:3)5,"content":"todo : This is a temporary fix so we can close (https://github.com/{REPO_NAME_REDACTED}/issues/119)","isAdded":false},{"filename":"app/Events/DailyReportReassigned.php","line":35,"content":"todo: This is a temporary fix so we can close (https://github.com/{REPO_NAME_REDACTED}/issues/119)","isAdded":true},{"filename":"app/Events/Knack/DailyReport/DailyReportKnackIdRetrieved.php","line":10,"content":"todo - I think we may be able to create an abstract KnackIdRetrieved event that","isAdded":false},{"filename":"app/Events/Knack/DailyReport/DailyReportKnackIdRetrieved.php","line":10,"content":"todo (DC) - I think we may be able to create an abstract KnackIdRetrieved event that","isAdded":true},{"filename":"app/Events/Traits/ConvertsKnackWorkSite.php","line":55,"content":"TODO: add support for multiple work types","isAdded":false},{"filename":"app/Events/Traits/ConvertsKnackWorkSite.php","line":55,"content":"todo: add support for multiple work types","isAdded":true},{"filename":"app/Events/WorkSiteKnackIdRetrieved.php","line":10,"content":"todo - I think we may be able to create an abstract KnackIdRetrieved event that","isAdded":false},{"filename":"app/Events/WorkSiteKnackIdRetrieved.php","line":10,"content":"todo (DC) - I think we may be able to create an abstract KnackIdRetrieved event that","isAdded":true},{"filename":"app/Http/Controllers/WorkSiteController.php","line":83,"content":"TODO : Validate form request","isAdded":false},{"filename":"app/Http/Controllers/WorkSiteController.php","line":83,"content":"todo : Validate form request","isAdded":true},{"filename":"app/Http/Integrations/Knack/KnackConnector.php","line":73,"content":"TODO: remove this. It just a test to see if we can leverage the","isAdded":false},{"filename":"app/Http/Integrations/Knack/KnackConnector.php","line":73,"content":"todo (DC): remove this. It just a test to see if we can leverage the","isAdded":true},{"filename":"app/Http/Integrations/Knack/Resources/DailyReportResource.php","line":2[4](https://github.com/{REPO_NAME_REDACTED}/actions/runs/11484107217/job/31961096207#step:9:4),"content":"TODO: remove this fix to prevent a \"typed property cant be access before initialization\" error","isAdded":false},{"filename":"app/Http/Integrations/Knack/Resources/DailyReportResource.php","line":24,"content":"todo (ES): remove this fix to prevent a \"typed property cant be access before initialization\" error","isAdded":true},{"filename":"app/Http/Resources/DailyReportResource.php","line":63,"content":"todo (ES): fix this when permits are flattened","isAdded":false},{"filename":"app/Http/Resources/DailyReportResource.php","line":63,"content":"todo (ES): fix this when permits are finally flattened","isAdded":true},{"filename":"app/Models/Shift.php","line":1[5](https://github.com/{REPO_NAME_REDACTED}/actions/runs/11484107217/job/31961096207#step:9:5)7,"content":"todo (ES): Implement this confidently and add tests","isAdded":false},{"filename":"app/Models/Shift.php","line":157,"content":"todo (ES): Implement this confidently and add tests. prob deletable now?","isAdded":true},{"filename":"app/Models/Traits/HasKnackConfig.php","line":104,"content":"todo - once we have moved all resources to KnackConfig, kill this.","isAdded":false},{"filename":"app/Models/Traits/HasKnackConfig.php","line":104,"content":"todo (DC) - once we have moved all resources to KnackConfig, kill this.","isAdded":true},{"filename":"app/Models/User.php","line":1[6](https://github.com/{REPO_NAME_REDACTED}/actions/runs/11484107217/job/31961096207#step:9:6)6,"content":"todo - remove this when we kill knack","isAdded":false},{"filename":"app/Models/User.php","line":166,"content":"todo (ES) - remove this when we kill knack","isAdded":true},{"filename":"app/Models/User.php","line":1[7](https://github.com/{REPO_NAME_REDACTED}/actions/runs/11484107217/job/31961096207#step:9:7)4,"content":"TODO: Add some UserRole-based logic here","isAdded":false},{"filename":"app/Models/User.php","line":174,"content":"todo (ES): Add some UserRole-based logic here","isAdded":true},{"filename":"app/Models/WorkSite.php","line":316,"content":"TODO: `cleanup_work_order_scheduled_at` can eventually be replaced","isAdded":false},{"filename":"app/Models/WorkSite.php","line":316,"content":"todo (ES): `cleanup_work_order_scheduled_at` can eventually be replaced","isAdded":true},{"filename":"app/Models/WorkSite.php","line":323,"content":"TODO: There is a problem with Spatie enums and Nova.","isAdded":false},{"filename":"app/Models/WorkSite.php","line":323,"content":"todo (ES): There is a problem with Spatie enums and Nova.","isAdded":true},{"filename":"app/Nova/Permit.php","line":79,"content":"TODO: turn into a reusable custom field type","isAdded":false},{"filename":"app/Nova/Permit.php","line":79,"content":"todo (ES): turn into a reusable custom field type","isAdded":true},{"filename":"app/Nova/Task.php","line":112,"content":"todo: How do I load current values on this when editing?","isAdded":false},{"filename":"app/Nova/Task.php","line":112,"content":"todo (ES): How do I load current values on this when editing?","isAdded":true},{"filename":"app/Nova/WorkSite.php","line":371,"content":"TODO: turn into a reusable custom field type","isAdded":false},{"filename":"app/Nova/WorkSite.php","line":371,"content":"todo (ES): turn into a reusable custom field type","isAdded":true},{"filename":"app/Observers/WorkOrderObserver.php","line":2[8](https://github.com/{REPO_NAME_REDACTED}/actions/runs/11484107217/job/31961096207#step:9:8),"content":"todo (ES): how do I handle media in Verbs? I was able to do it in CompleteWorkOrder","isAdded":false},{"filename":"app/Observers/WorkOrderObserver.php","line":28,"content":"todo (ES): how do I handle media updloads in Verbs? I was able to do it in CompleteWorkOrder","isAdded":true},{"filename":"database/migrations/2023_05_10_400000_modify_users_table.php","line":2[9](https://github.com/{REPO_NAME_REDACTED}/actions/runs/11484107217/job/31961096207#step:9:9),"content":"todo - remove these once \"roles\" is fleshed out","isAdded":false},{"filename":"database/migrations/2023_05_[10](https://github.com/{REPO_NAME_REDACTED}/actions/runs/11484107217/job/31961096207#step:9:10)_400000_modify_users_table.php","line":29,"content":"todo (ES) - remove these once \"roles\" is fleshed out","isAdded":true},{"filename":"database/migrations/2023_10_18_1928[12](https://github.com/{REPO_NAME_REDACTED}/actions/runs/11484107217/job/31961096207#step:9:12)_create_permits_table.php","line":24,"content":"todo: should we track ocmc approval?","isAdded":false},{"filename":"database/migrations/2023_10_18_192812_create_permits_table.php","line":24,"content":"todo (ES): should we track ocmc approval?","isAdded":true},{"filename":"database/migrations/2023_10_18_192812_create_permits_table.php","line":28,"content":"todo: should we do this?","isAdded":false},{"filename":"database/migrations/2023_10_18_192812_create_permits_table.php","line":28,"content":"todo (ES): should we do this?","isAdded":true},{"filename":"database/schemas/db-schema-v3.dbml","line":350,"content":"TODO: add necessary fields to Laravel User model","isAdded":false},{"filename":"database/schemas/db-schema-v3.dbml","line":358,"content":"TODO: Delete this in favor of Cost Codes?","isAdded":false},{"filename":"database/schemas/db-schema-v3.dbml","line":366,"content":"TODO: Delete inventory_items?","isAdded":false},{"filename":"resources/js/Components/Dispatcher/DispatcherEquipmentDailyReport.vue","line":[13](https://github.com/{REPO_NAME_REDACTED}/actions/runs/11484107217/job/31961096207#step:9:13),"content":"todo: Implement this computed property","isAdded":false},{"filename":"resources/js/Components/Dispatcher/DispatcherEquipmentDailyReport.vue","line":13,"content":"todo (ES): Implement this computed property","isAdded":true},{"filename":"resources/js/Components/Dispatcher/DispatcherLaborDailyReport.vue","line":12,"content":"todo: Implement this computed property","isAdded":false},{"filename":"resources/js/Components/Dispatcher/DispatcherLaborDailyReport.vue","line":12,"content":"todo (ES): Implement this computed property","isAdded":true},{"filename":"resources/js/Components/Scheduler/SchedulerDailyReport.vue","line":44,"content":"todo: remove this in favor of higher-level grid width mgmt","isAdded":false},{"filename":"resources/js/Components/Scheduler/SchedulerDailyReport.vue","line":44,"content":"todo (ES): remove this in favor of higher-level grid width mgmt","isAdded":true},{"filename":"tests/Feature/Events/WorkOrders/WorkOrderRequestedTest.php","line":26,"content":"todo: change to enum. serialization is breaking","isAdded":false},{"filename":"tests/Feature/Events/WorkOrders/WorkOrderRequestedTest.php","line":26,"content":"todo (?): change to enum. serialization is breaking","isAdded":true},{"filename":"tests/Feature/Http/Controllers/DailyReportControllerTest.php","line":345,"content":"todo (ES): fix this when permits are flattened","isAdded":false},{"filename":"tests/Feature/Http/Controllers/DailyReportControllerTest.php","line":345,"content":"todo (ES): fix this when permits are finally flattened","isAdded":true},{"filename":"tests/Feature/Http/Controllers/LaborShiftControllerTest.php","line":232,"content":"todo: this is not yet implemented in the ShiftDeleted event","isAdded":false},{"filename":"tests/Feature/Http/Controllers/LaborShiftControllerTest.php","line":232,"content":"todo (ES): this is not yet implemented in the ShiftDeleted event","isAdded":true},{"filename":"tests/Feature/Knack/Data/Transformers/KnackBooleanTransformerTest.php","line":39,"content":"todo: can we figure out a way to return the actual boolean value here","isAdded":false},{"filename":"tests/Feature/Knack/Data/Transformers/KnackBooleanTransformerTest.php","line":39,"content":"todo (ES): can we figure out a way to return the actual boolean value here","isAdded":true},{"filename":"tests/Feature/Knack/Data/Transformers/KnackEquipmentStatusTransformerTest.php","line":34,"content":"todo: can we figure out a way to return the actual boolean value here","isAdded":false},{"filename":"tests/Feature/Knack/Data/Transformers/KnackEquipmentStatusTransformerTest.php","line":34,"content":"todo (ES): can we figure out a way to return the actual boolean value here","isAdded":true},{"filename":"tests/Feature/Notifications/FiberWorkSiteCompletedTodosNotificationTest.php","line":34,"content":"todo: make sure to test the recipients somewhere else...maybe the WorkSiteObserver test or something?","isAdded":false},{"filename":"tests/Feature/Notifications/FiberWorkSiteCompletedTodosNotificationTest.php","line":35,"content":"TodosNotification::class, config('mail.team_emails.fiber_team.address'));","isAdded":false}]
Found 2 existing Todos
Found 33 new Todos
Add found todos as comments to PR #371
Error: Validation Failed: {"resource":"PullRequestReviewComment","code":"custom","field":"pull_request_review_thread.line","message":"pull_request_review_thread.line must be part of the diff"}, {"resource":"PullRequestReviewComment","code":"missing_field","field":"pull_request_review_thread.diff_hunk"} - https://docs.github.com/rest/pulls/comments#create-a-review-comment-for-a-pull-request