From ef7bdf43c7366d84584d3e720e6d04d46ca30dda Mon Sep 17 00:00:00 2001 From: Colm Bhandal Date: Wed, 30 Aug 2023 15:03:50 +0100 Subject: [PATCH 1/4] Update README.md --- actions/contributing-update/README.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/actions/contributing-update/README.md b/actions/contributing-update/README.md index 099e30b..7c27be4 100644 --- a/actions/contributing-update/README.md +++ b/actions/contributing-update/README.md @@ -1,7 +1,22 @@ -### Contributing Workflow +## Contributing Workflow This action checks the contributing file for a charm and updates it if necessary. The action runs a script that generates a fresh contributing file from a template and placeholder values defined at the charm level. This generated file is compared against the contributing file already in the charm's directory. If they differ, another step is run to create a PR overwriting the existing file with the freshly generated one. -### contributing_inputs.yaml +## contributing_inputs.yaml -This file, existing in charm's directory, defines all charm-specific inputs that will be injected into the `contributing.md.template` file to form the new `contributing.md` file. If this file doesn't exist, or doesn't contain definitions for all template values, the contributing update will fail, as there won't be enough information to generate the new `contributing.md` file from the template. \ No newline at end of file +This file, existing in charm's directory, defines all charm-specific inputs that will be injected into the `contributing.md.template` file to form the new `contributing.md` file. If this file doesn't exist, or doesn't contain definitions for all template values, the contributing update will fail, as there won't be enough information to generate the new `contributing.md` file from the template. + +## Updates + +### Charm Specific + +Whenever we want to make changes to a charm contributing.md, we: + +1. Update contributing_inputs.yaml +1. We can also update the `contributing.md` file directly if we like, if we want to avoid another PR +1. Push our changes +1. If the freshly generated `contributing.md`, based on the updated `contributing_inputs.yaml` plus the `contributing.md.template`, differs from `contributing.md`, the automation will catch this, and a PR will be opened to overwrite the existing `contributing.md` with the new one. + +### Template Updates + +Even if the charm-specific `contributing_inputs.yaml` has not changed, it is possible that `contributing.md.template` will change over time. In this case, all repositories using this workflow should re-run it. It is advisable, therefore, for such repositories to ensure they are running this workflow on a regular schedule, e.g. weekly, to detect such updates. From 2258dbad24c46442c64fa1bdd8b24f27ef8bb047 Mon Sep 17 00:00:00 2001 From: Colm Bhandal Date: Wed, 30 Aug 2023 15:13:59 +0100 Subject: [PATCH 2/4] Update README.md --- actions/contributing-update/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/actions/contributing-update/README.md b/actions/contributing-update/README.md index 7c27be4..a578832 100644 --- a/actions/contributing-update/README.md +++ b/actions/contributing-update/README.md @@ -12,11 +12,13 @@ This file, existing in charm's directory, defines all charm-specific inputs that Whenever we want to make changes to a charm contributing.md, we: -1. Update contributing_inputs.yaml +1. Update `contributing_inputs.yaml` 1. We can also update the `contributing.md` file directly if we like, if we want to avoid another PR 1. Push our changes 1. If the freshly generated `contributing.md`, based on the updated `contributing_inputs.yaml` plus the `contributing.md.template`, differs from `contributing.md`, the automation will catch this, and a PR will be opened to overwrite the existing `contributing.md` with the new one. +Note: the generate PR will target the `main` branch, BUT the target branch could always be changed to the same branch as the one updating `contributing_inputs.yaml`, and then merged into that without review, to avoid having two PRs to review. + ### Template Updates Even if the charm-specific `contributing_inputs.yaml` has not changed, it is possible that `contributing.md.template` will change over time. In this case, all repositories using this workflow should re-run it. It is advisable, therefore, for such repositories to ensure they are running this workflow on a regular schedule, e.g. weekly, to detect such updates. From 232d6d06cbc0706b49c9d6e68bf9e6e5d5e86cf8 Mon Sep 17 00:00:00 2001 From: Colm Bhandal Date: Fri, 1 Sep 2023 16:40:19 +0100 Subject: [PATCH 3/4] Update actions/contributing-update/README.md Co-authored-by: Phoevos Kalemkeris --- actions/contributing-update/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/contributing-update/README.md b/actions/contributing-update/README.md index a578832..eb40012 100644 --- a/actions/contributing-update/README.md +++ b/actions/contributing-update/README.md @@ -1,4 +1,4 @@ -## Contributing Workflow +# Contributing Workflow This action checks the contributing file for a charm and updates it if necessary. The action runs a script that generates a fresh contributing file from a template and placeholder values defined at the charm level. This generated file is compared against the contributing file already in the charm's directory. If they differ, another step is run to create a PR overwriting the existing file with the freshly generated one. From 8d437a14c7ce74992ec6168b6bad5486e1df8a87 Mon Sep 17 00:00:00 2001 From: Colm Bhandal Date: Fri, 1 Sep 2023 16:40:27 +0100 Subject: [PATCH 4/4] Update actions/contributing-update/README.md Co-authored-by: Phoevos Kalemkeris --- actions/contributing-update/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/contributing-update/README.md b/actions/contributing-update/README.md index eb40012..82267b7 100644 --- a/actions/contributing-update/README.md +++ b/actions/contributing-update/README.md @@ -10,7 +10,7 @@ This file, existing in charm's directory, defines all charm-specific inputs that ### Charm Specific -Whenever we want to make changes to a charm contributing.md, we: +Whenever we want to make changes to a charm `contributing.md`, we: 1. Update `contributing_inputs.yaml` 1. We can also update the `contributing.md` file directly if we like, if we want to avoid another PR