github / github/branch-deploy

Support for multiple deployments in one comment

Ouverte
#411 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
question
Langage dominant
TypeScript
Étoiles
576
Forks
74
Merge moyen
11 h 7 min
PR mergées (30 j)
1

Description

### Details

# Hello

I would like to ask if it is possible to replace `context.payload.comment.body` with a specific comment body that is passed through the workflow call.

The reason I’m asking is that I want to support multiple deployments from a single comment. The repository I’m working on contains many different ArgoCD-managed apps (spread across 10+ clusters).

The way we currently use `.deploy` is like this:
```
.deploy app1-enva
```
where `app1` is the application and `enva` is the cluster where we want to deploy it.

I forked the repo about 2 months ago and made it work by building a matrix from the different `.deploy` commands and then running each sequentially. However, the branch-deploy workflow wanted to use the whole comment, e.g.:
```
.deploy app1-enva .deploy app2-envb
```
So I made some changes in the code and replaced `context.payload.comment.body` with a specific `COMMENT_BODY` passed from the matrix (always the one currently deploying). This worked.

Now, I’ve been asked if there’s a way to merge this change back into the original repo so we don’t need to maintain a separate fork.

So my question is: **Is it possible to merge my changes that replace `context.payload.comment.body` with a specific comment body that gets passed in through the workflow call?** Or it would break too many things for other users?

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par localiser le workflow branch-deploy et chaque utilisation de context.payload.comment.body, puis comparez ces chemins avec l’entrée de workflow COMMENT_BODY proposée et le flux de déploiement basé sur une matrice. Vérifiez comment un seul commentaire de déploiement est actuellement analysé et transmis à travers le workflow. C’est terminé lorsque plusieurs commandes .deploy peuvent être traitées indépendamment sans casser le comportement existant pour une seule commande.

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

Évaluation

Stack technique
github-actions, typescript
Domaine
ci-cd, devops
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

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