You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{% data reusables.actions.enterprise-github-hosted-runners %}
23
+
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
20
24
21
25
## Introduction
22
26
23
-
This tutorial demonstrates how to use the [`actions/github-script` action](https://github.com/marketplace/actions/github-script)in a workflow to label newly opened or reopened issues. For example, you can add the`triage`label every time an issue is opened or reopened. Then, you can see all issues that need to be triaged by filtering for issues with the `triage` label.
27
+
Ce tutoriel montre comment utiliser [l’action `actions/github-script`](https://github.com/marketplace/actions/github-script)dans un workflow pour étiqueter les problèmes nouvellement ouverts ou rouverts. Par exemple, vous pouvez ajouter l’étiquette`triage`chaque fois qu’un problème est ouvert ou rouvert. Ensuite, vous pouvez voir tous les problèmes qui doivent être triés en filtrant les problèmes à l’aide de l’étiquette `triage`.
24
28
25
-
The`actions/github-script`action allows you to easily use the {% data variables.product.prodname_dotcom %} API in a workflow.
29
+
L’action`actions/github-script`vous permet d’utiliser facilement l’API {% data variables.product.prodname_dotcom %} dans un workflow.
26
30
27
-
In the tutorial, you will first make a workflow file that uses the [`actions/github-script` action](https://github.com/marketplace/actions/github-script). Then, you will customize the workflow to suit your needs.
31
+
Dans le tutoriel, vous allez d’abord créer un fichier de workflow qui utilise [l’action `actions/github-script`](https://github.com/marketplace/actions/github-script). Ensuite, vous personnaliserez le workflow en fonction de vos besoins.
28
32
29
-
## Creating the workflow
33
+
## Création du workflow
30
34
31
35
1. {% data reusables.actions.choose-repo %}
32
36
2. {% data reusables.actions.make-workflow-file %}
33
-
3.Copy the following YAML contents into your workflow file.
37
+
3.Copiez le contenu YAML suivant dans votre fichier de workflow.
34
38
35
39
```yaml{:copy}
36
40
name: Label issues
@@ -56,23 +60,23 @@ In the tutorial, you will first make a workflow file that uses the [`actions/git
56
60
})
57
61
```
58
62
59
-
4. Customize the `script` parameter in your workflow file:
60
-
- The `issue_number`, `owner`, and `repo` values are automatically set using the `context` object. You do not need to change these.
61
-
- Change the value for `labels` to the list of labels that you want to add to the issue. Separate multiple labels with commas. For example, `["help wanted", "good first issue"]`. For more information about labels, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)."
63
+
4. Personnalisez le paramètre `script` dans votre fichier de workflow :
64
+
- Les valeurs `issue_number`, `owner` et `repo` sont automatiquement définies à l’aide de l’objet `context` . Il est inutile de les modifier.
65
+
- Remplacez la valeur de `labels` par la liste des étiquettes que vous souhaitez ajouter au problème. Séparez plusieurs étiquettes par des virgules. Par exemple : `["help wanted", "good first issue"]`. Pour plus d’informations sur les étiquettes, consultez « [Gestion des étiquettes](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests) ».
62
66
5. {% data reusables.actions.commit-workflow %}
63
67
64
-
## Testing the workflow
68
+
## Test du workflow
65
69
66
-
Every time an issue in your repository is opened or reopened, this workflow will add the labels that you specified to the issue.
70
+
Chaque fois qu’un problème dans votre dépôt est ouvert ou rouvert, ce workflow ajoute les étiquettes que vous avez spécifiées au problème.
67
71
68
-
Test out your workflow by creating an issue in your repository.
72
+
Testez votre workflow en créant un problème dans votre dépôt.
69
73
70
-
1. Create an issue in your repository. For more information, see "[Creating an issue](/github/managing-your-work-on-github/creating-an-issue)."
71
-
2. To see the workflow run that was triggered by creating the issue, view the history of your workflow runs. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)."
72
-
3. When the workflow completes, the issue that you created should have the specified labels added.
74
+
1. Créez un problème dans votre dépôt. Pour plus d’informations, consultez « [Création d’un problème](/github/managing-your-work-on-github/creating-an-issue) ».
75
+
2. Pour voir l’exécution du workflow qui a été déclenchée par la création du problème, affichez l’historique des exécutions de votre workflow. Pour plus d’informations, consultez « [Affichage de l’historique des exécutions de workflows](/actions/managing-workflow-runs/viewing-workflow-run-history) ».
76
+
3. Une fois le workflow terminé, les étiquettes spécifiées doivent avoir été ajoutées au problème que vous avez créé.
73
77
74
-
## Next steps
78
+
## Étapes suivantes
75
79
76
-
- To learn more about additional things you can do with the `actions/github-script` action, see the [`actions/github-script` action documentation](https://github.com/marketplace/actions/github-script).
77
-
- To learn more about different events that can trigger your workflow, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#issues)."
78
-
- [Search GitHub](https://github.com/search?q=%22uses:+actions/github-script%22&type=code) for examples of workflows using this action.
80
+
- Pour en savoir plus sur d’autres choses que vous pouvez faire avec l’action `actions/github-script`, consultez la [`actions/github-script`documentation sur l’action](https://github.com/marketplace/actions/github-script).
81
+
- Pour en savoir plus sur les différents événements qui peuvent déclencher votre workflow, consultez « [Événements qui déclenchent des workflows](/actions/reference/events-that-trigger-workflows#issues) ».
82
+
- [Visitez GitHub](https://github.com/search?q=%22uses:+actions/github-script%22&type=code) pour trouver des exemples de workflow utilisant cette action.
0 commit comments