`cml pr` needs more docs and/or diagrams

Ouverte
#390 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
25/100
Type d'issue
Documentation
Clarté
À clarifier
Activité
À l'abandon
Domaine
cli, documentation

Piste de recherche

Commencez par la discussion liée de la pull request et par les flux cml pr --merge et cml pr décrits ici. Clarifiez la séquence des branches et de la CI, puis documentez-la avec des diagrammes et expliquez quel workaround est prévu ; l’issue ne nomme aucun fichier de documentation ni aucun test à exécuter.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

documentation

Coming from here

From discussion:

cml pr --merge then:

  1. CI runs on the new branch created (let's call it cml-branch-1), generating in turn a new branch cml-branch-2, etc.
  2. once the branch cml-branch-1 is automatically merged into the original branch (typically a feature branch), CI will run again, which will again create a new branch cml-branch-1b. This branch will in turn generate a new look as in 1.

I don't follow (branch names are confusing). Do you mean "2. once cml-branch-2 is automatically merged into cml-branch-1 ..." instead? If so, the flow would be:

flowchart LR
M(main) -->|1. branch| F(feat) -->|2. branch| C1(cml-branch-1) -->|3. CI: cml pr --merge| C2(cml-branch-2)
C2 -->|4. CI: auto merge| C1 -->|5. CI: cml pr --merge| C1b(cml-branch-1b) -->|CI: infinite loop| C1

If so, this makes sense. And you ideally would like cml-branch-1b never to be created, right?

cml pr (without the auto-merge), then:

  1. CI will not run on the branch cml-branch-1. So far so good!

I don't follow.

  1. Once I will manually merge cml-branch-1 back in the feature branch, if I don't manually add "[ci skip]" to the commit message, CI will run again on the feature branch, generating cml-branch-1b.
flowchart LR
M(main) -->|1. branch| F(feat) -->|2. branch| C1(cml-branch-1) -->|3. CI: cml pr| C2(cml-branch-2)
C2 -->|"4. manual merge, entering [skip ci] into message"| C1

Anyway there are many work-arounds:

  1. deterministic runs [not opening PRs because of] diff being empty.

  2. feature request: make "[skip ci]" [appear in] all commit message of branches/PR created via cml pr

  3. feature request:
flowchart LR
M(main) -->|1. branch| F(feat) -->|2. branch| C1(cml-branch-1) -->|3. CI: cml pr --merge --skip-ci| C2("cml-branch-2 with commit containing [skip ci]")
C2 -->|"4. auto merge without any CI tests running"| C1
  1. feature request:
flowchart LR
M(main) -->|1. branch| F(feat) -->|2. branch| C1(cml-branch-1) -->|3. CI: cml pr --merge --skip-ci| C2(cml-branch-2)
C2 -->|"4. auto merge, inserting [skip ci] into the merge commit message"| C1

So basically the problem with this PR currently is "auto merge without any CI tests running" right? Work-around (3) is broken? So we should do work-around (4)?

Langage dominant
TypeScript
Étoiles
13
Forks
22
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de iterative/cml.dev

Toutes les issues de iterative/cml.dev

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.