Title: Clean up stale Bitbucket steps when switching to pre-commit by Copilot · Pull Request #1293 · usethis-python/usethis-python · GitHub
Open Graph Title: Clean up stale Bitbucket steps when switching to pre-commit by Copilot · Pull Request #1293 · usethis-python/usethis-python
X Title: Clean up stale Bitbucket steps when switching to pre-commit by Copilot · Pull Request #1293 · usethis-python/usethis-python
Description: Plan to Fix Stale Bitbucket Steps Issue
Problem: Tool.update_bitbucket_steps() returns early when is_pre_commit_used() is true (line 683-684), which prevents cleanup of previously-added Bitbucket steps. This leaves stale steps in bitbucket-pipelines.yml after switching to pre-commit.
Solution: Before returning early when pre-commit is used, remove any managed Bitbucket steps for this tool.
Checklist:
Write test case that reproduces the stale steps issue
Create test that adds Bitbucket steps for a tool
Enable pre-commit and re-run update_bitbucket_steps()
Verify that stale steps are removed
Fix the bug in Tool.update_bitbucket_steps()
Call remove_bitbucket_steps() when pre-commit is used before returning
Ensure this only runs when Bitbucket is actually used
Add check for self.is_used() to prevent removing steps for unused tools
Add test to verify steps are NOT removed when tool is not used
Run broader test suite to ensure no regressions (119 passed, 1 skipped)
Request code review
Run CodeQL security checker
Security Summary
No security vulnerabilities were discovered during analysis.
Original prompt
This section details on the original issue you should resolve
Open Graph Description: Plan to Fix Stale Bitbucket Steps Issue Problem: Tool.update_bitbucket_steps() returns early when is_pre_commit_used() is true (line 683-684), which prevents cleanup of previously-added Bitbucket s...
X Description: Plan to Fix Stale Bitbucket Steps Issue Problem: Tool.update_bitbucket_steps() returns early when is_pre_commit_used() is true (line 683-684), which prevents cleanup of previously-added Bitbucket s...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1293
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a7cb016f-1a55-feee-595d-7c36b73093a3 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8F3E:3C2F84:58A21:6EF2E:6A4D8A65 |
| html-safe-nonce | 9882649ad3444b5700eb979143de9e3ecd16ac8a2db98ea0197725b2af3d4b76 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjNFOjNDMkY4NDo1OEEyMTo2RUYyRTo2QTREOEE2NSIsInZpc2l0b3JfaWQiOiIyNzQxMzI4MTUzMzY4NDMxMjA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 274f6a23a3baf887987b65dc7c99c7510b38edc5d5d539c2bb1769efff85a4a3 |
| hovercard-subject-tag | pull_request:3265978661 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/usethis-python/usethis-python/pull/1293/files |
| twitter:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| og:image:alt | Plan to Fix Stale Bitbucket Steps Issue Problem: Tool.update_bitbucket_steps() returns early when is_pre_commit_used() is true (line 683-684), which prevents cleanup of previously-added Bitbucket s... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9f8758a3953dfe943439713a6fa4f90d542a3431f10e861ca03dd7f39009f320 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bffd5484f01713a661b03469b77678f72b6574ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width