We have been attempting to use the “connect to repository” feature to backup our collections and api definition to a Bitbucket repository. For the most part, it seems to work fine if I stay on a single branch and do all of my work in there. However, if I try to switch to a different branch it appears that all of the request bodies for my PUT and POST request are getting removed. It has happened multiple times and I’m not sure if this is just a bug with the feature or if I am doing something wrong.
Here is how we have everything setup and what the typical workflow looks like:
- Test Collection exists in Bitbucket and we have used the “connect to repository” option to associate the collection with a given api
- Master is the main branch - this is locked down so that no one can commit directly to this branch. Everything has to be merged through a PR. This is what we use as the source of truth for our pipeline integration.
- Develop is the working branch. All branches are created off develop. When work is completed, a PR is created and merged back to develop. Develop is merged back to master at the end of every sprint as long as everything is green.
- When I have a new ticket, I will branch off develop using SourceTree. Once the branch is created and pushed to remote, I can then go to postman and select the ‘switch branch’ option, type in the name of my new branch and then all work I commit and push is pushed to this new branch.
The last step above is where the issue comes in. Once I switch to that new branch that was just created off develop, all the PUT and POST request bodies are removed. If I take the collection file for the new branch and import that as a new collection the request bodies are all there. So it seems that the postman UI is not reflecting the changes that exist in Bitbucket correctly. Something is happening behind the scenes that is removing these request bodies and the first time I commit and push the changes to this branch I can see the changes that I did not make in the diff. Anyone else run into this problem? Am I just doing something wrong here? I would like to be able to switch branches to work on new tickets and not commit all my work directly to the ‘develop’ branch.