From 06847ead59570316470335078bf84a572ef42a87 Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Fri, 7 Jun 2024 14:32:56 +1200 Subject: [PATCH 1/3] Add a section on PR commit messages. --- HACKING.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/HACKING.md b/HACKING.md index b169960c8..edcb14e4e 100644 --- a/HACKING.md +++ b/HACKING.md @@ -160,6 +160,38 @@ your charm to a controller using that version of Juju. For example, with microk8 We rely on automation to [update charm pins](.github/actions/update-charm-pins/) of a bunch of charms that use the operator framework. The script can be run locally too. +# Contributing + +Changes are proposed as [pull requests on GitHub](https://github.com/canonical/operator/pulls). + +Pull requests should have a short title that follows the +[conventional commit style](https://www.conventionalcommits.org/en/) using one of these types:: + +* chore +* ci +* docs +* feat +* fix +* perf +* refactor +* revert +* test + +If the PR is limited to one of the following scopes, also include the scope in the title, +and otherwise leave off the scope. + +* harness + +For example:: + +* feat: add the ability to observe change-updated events +* fix!: correct the type hinting for config data +* docs(harness): clarify the types of exceptions that Harness.add_user_secret may raise + +Note that the commit messages to the PR's branch do not need to follow the +conventional commit format, as these will be squashed into a single commit to `main` +using the PR title as the commit message. + # Documentation In general, new functionality From 9b562dbea86765d8edcd8fdd8affbaf4bd4b5a04 Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Fri, 7 Jun 2024 14:35:14 +1200 Subject: [PATCH 2/3] This is markdown not rest, no need for ::. --- HACKING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HACKING.md b/HACKING.md index edcb14e4e..f601a469d 100644 --- a/HACKING.md +++ b/HACKING.md @@ -165,7 +165,7 @@ a bunch of charms that use the operator framework. The script can be run locally Changes are proposed as [pull requests on GitHub](https://github.com/canonical/operator/pulls). Pull requests should have a short title that follows the -[conventional commit style](https://www.conventionalcommits.org/en/) using one of these types:: +[conventional commit style](https://www.conventionalcommits.org/en/) using one of these types: * chore * ci @@ -182,7 +182,7 @@ and otherwise leave off the scope. * harness -For example:: +For example: * feat: add the ability to observe change-updated events * fix!: correct the type hinting for config data From 9065fb0851047e5cb14d25ccadffc5cad025ec87 Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Mon, 10 Jun 2024 16:37:37 +1200 Subject: [PATCH 3/3] Adjust wording as per review. --- HACKING.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/HACKING.md b/HACKING.md index f601a469d..e258ec946 100644 --- a/HACKING.md +++ b/HACKING.md @@ -177,10 +177,8 @@ Pull requests should have a short title that follows the * revert * test -If the PR is limited to one of the following scopes, also include the scope in the title, -and otherwise leave off the scope. - -* harness +If the PR is limited to changes in ops.testing (Harness), also include the scope +`(harness)` in the title. At present, we do not add a scope in any other cases. For example: