Replicate changes from one repository to another

Asked

Viewed 58 times

0

I have 3 repositories that use the same component. I would like when making changes to this component, to be able to replicate to the other.

It is possible?

  • Hi, @Leticia. What language are these repository projects in? Java, Go, PHP...? Do these components follow any construction scheme? For example, PSR, plug-in, add-on, is just a folder with code, ...? Give us more information. Maybe even the Github repositories link if they are public. Github has Hooks (such as event triggers) that can help you automate replication.

  • Angular,html and css. It is a navbar that is equal in the three repositories

  • I don’t know exactly how the repositories are, but try to follow the concept to see if it makes sense to you. Have this navbar as a component (module) in a single project. Package it with ng-packagr and then publish it to NPM. Finally, add it as dependency on your other projects. That’s just concept. There is a lot to be done, such as installing ng-packagr, you having an NPM account (you probably have it), your component being programmed as an Angular module, etc. I’m still trying to imagine how your Changes are.

1 answer

0

Using componentization is a good practice for distributing common software/code across applications, but it is not ideal to do this in the repository itself.

A component, which is a reusable set of code, should be treated as an application in itself. Therefore, it will have its own repository and compilation process that should deliver a binary artifact. This is why it is important that this artifact does not constantly break your API, and when it is done, that it is as stable as possible. Dropping versions that indicate that the API will be changed, etc...

So if at the end of this process we have a binary, it should not be stored in a code repository, but rather a package repository. There are several out there, from the specifics, which store packages of a language, to the so-called universal package repositories, which are in evidence at the moment.

For example:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.