Open KOLANICH opened 3 years ago
I just have a feeling that most of the time there will be merge conflicts that people can't be bothered to deal with. This is especially true if you have massively edited the original code
@TheOtterlord
most of the time there will be merge conflicts that people can't be bothered to deal with. This is especially true if you have massively edited the original code
The software is meant to assumme that the ones used the templates preserve some structure that they define. And that the users' custom changes must fit into the template. There is no merge conflicts by definition - the patch is meant to be generated upon the repo main branch most recent commit, so all the merges of the PRs are fast-forwards.
Project description
I have a lot of python repos. They follow the same template/boilerplate.
Solution
Repos detection. Though GH stores some internal metadata about templates from which a repo is generated, it does it for advertising purposes mostly:
So, the solution is to put a file with some dedicated extension and an unique token and use advanced code search. This may be:
Changes detection. Proper non-cooperative changes detection without general purpose AI feels like impossible. So have to use cooperative and restricted one. Template should be properly annotated in a machine-readable way. The algo should consider the template as a ... template and match against it the content of the repo. This will provide the tool with the info of the semantics of each block. Then each block is processed according to the semantics. It is generated from scratch every time, then the resulting repo is composed from the blocks, then a PR is sent to a repo if there are any diffs.
There are 4 types of blocks in each readme
=
should be used for underlining.and 2 universal ones for files like packages manifests
On each template update a GitHub
push
-triggered action is called, that discovers repos with the template enabled, regenerates some its parts, checks if anything has changed, if there is - sends a PR. Which parts should be regenerated is configured in a config file.github/templater.toml
.The template usage assummes the following workflow:
.github/.templateMarker
;Relevant Technology
Complexity and required time
Complexity
[x] Beginner - This project requires no or little prior knowledge of the technolog(y|ies) specified to contribute to the project
Required time (ETA)
[x] Little work - A couple of days
Categories