I need to search and replace some hardcoded keys in many repos on bitbucket. Is there a way to automate the process?
Hey @tiany4,
You might be able to use Code Search to find all of the hardcoded keys (note that there's a limit on file size of 320KB – bigger files are not indexed and don't appear in search results).
Unfortunately there's no batch repo edit operation, you'll need to make changes repo by repo.
You can create commits via REST API but note that this won't remove the key from repo history. If you need to wipe repo history as well, you need to use history rewrite which is more complex and can't be done via REST or UI, only in the local working copy.
Hope this helps. Let me know if you have any questions.
Cheers,
Daniil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.