Forum Discussion

RichardSoares's avatar
RichardSoares
New Member
4 years ago

GitHub Integration Overwrites Merged Branch Code

What is wrong with my workflow that causes an updated Swagger API to overwrite the master branch in GitHub?

 

I have created my SwaggerHub API.

I have the API setup with GitHub Integration (pushing to a unique branch SWAGGERHUB).

 

Workflow:

1. Create SwaggerHub API

2. Push it to GitHub via the Integration (its own branch)

3. Merge SwaggerHub Branch to Master

4. Clone GitHub Repo locally

5. Build out Stubs with business logic (aka OperationID's)

6. Push to Master branch on GitHub.

7. Make an API update using SwaggerHub Editor. (aka: stakeholder change)

8. Push it to GitHub via the Integration (its own branch)

9. Merge SwaggerHub Branch to Master

10. The Stub files are completely replaced by the updated SwaggerHub Branch. There is no "merge" event as GitHub is seeing ALL lines of code as NEW from SwaggerHub.  The expectation was to merge the changed OpertionID methods... not wipeout the work completed on the Master branch.

 

Current Solution... 

Make edits in SwaggerHub, don't use Integration, then manually copy the new OpenAPI into the local development branch. (yea, really bad practice there).

No RepliesBe the first to reply