[dokuwiki] Re: How to automatically clean up the git repository of the translation tool?

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: DokuWiki Mailinglist <dokuwiki@xxxxxxxxxxxxx>
  • Date: Thu, 20 Oct 2016 10:41:25 +0200

Hi,

first of all thanks for your work on improving the translation tool.

From this I identify two issues:
  1.  the branch name is not unique, because the numbering could
restart by unknown reason.
  2.  old branches are littering in the repository

Here I experience that my git knowledge is not enough. My ideas so far:

Issue 1. could be improved by:
- other numbering approach (issue to solve in the tool)
- always pull before push (could this create conflicts?)
- check if branch exists before creating new branch?

Simplest solution is probably using a different naming scheme. Eg. use
the MD5 of the current time or something similar.

Pulling is most probably not a good idea.

Force pushing might work though (it would overwrite the previous branch)

Issue 2. could be improved by:
- automatically remove merged or closed branches. (so only open pull
requests should remain)

Actually, the branch could be removed right after creating the pull
request. Github creates a new (hidden) branch in the upstream
repository when creating the pull request to avoid loss of the data
when the original branch or repo is deleted.

Questions:
  A.  Do you know how to delete old branches, without deleting not
merged or not closed branches from our git repository?

I think github's API tells you what branches are merged. But not if
the pull request associated with it was closed.

Andi

-- 
splitbrain.org
-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: