From 9057be2b912c73bad34ca0914d88ee71f267fb75 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Fri, 23 May 2025 16:08:13 +0000 Subject: [PATCH] Comply with Policy for AI Generated Content While probably not meeting most people's definition of artificial intelligence these scripts do create patches. The OpenInfra Policy for AI Generated Content recommends to: > Add a "Generated-By:" label to the commit message, and explain in > comments or the commit message any prompts or background context > the reviewers might need to fully understand the change and how > much of the change was generated by the tool. Even though it also has a carve-out for these sorts of scripts: > The exception to the rule is that we do allow submissions from > well documented automated processes, such as release tooling or > for internationalization updates. https://openinfra.org/legal/ai-policy Nevertheless, documenting within the commit message the location of the script which was used to generate that contribution is helpful for a number of obvious reasons. Let's do it anyway, even though it's not technically required. Change-Id: I2c1fbbdad5ce6c54e4683ab54a453c921f5f3b22 --- playbooks/proposal/propose_update.sh | 2 +- .../files/release-tools/add_release_note_page.sh | 3 ++- .../release-tools/change_reno_branch_to_unmaintained.sh | 3 ++- .../files/release-tools/functions | 6 ++++-- .../files/release-tools/update_constraints.sh | 3 ++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/playbooks/proposal/propose_update.sh b/playbooks/proposal/propose_update.sh index 5fa03c8d5b..288f1e74b0 100755 --- a/playbooks/proposal/propose_update.sh +++ b/playbooks/proposal/propose_update.sh @@ -176,7 +176,7 @@ for PROJECT in $PROJECTS; do pushd $PROJECT_DIR if ! git diff --stat --exit-code HEAD ; then # Commit and review - git_args="-a -F- -s" + git_args="-a -F- -s --trailer='Generated-By:openstack/project-config:playbooks/proposal/propose_update.sh'" git commit $git_args < .gitreview git add .gitreview - git commit -m "Update .gitreview for $branch" -s + git commit -m "Update .gitreview for $branch" -s \ + --trailer="Generated-By:openstack/project-config:roles/copy-release-tools-scripts/files/release-tools/functions" git show local shortbranch=$(basename $branch) git review -t "create-${shortbranch}" --yes @@ -110,7 +111,8 @@ the requirements repository branches. Until the requirements repository has as $branch branch, tests will continue to use the upper-constraints list on master." - git commit -m "$msg" -m "$body" -s + git commit -m "$msg" -m "$body" -s \ + --trailer="Generated-By:openstack/project-config:roles/copy-release-tools-scripts/files/release-tools/functions" git show local shortbranch=$(basename $branch) git review -t "create-${shortbranch}" --yes diff --git a/roles/copy-release-tools-scripts/files/release-tools/update_constraints.sh b/roles/copy-release-tools-scripts/files/release-tools/update_constraints.sh index 47bdfcf752..a3e05e3f75 100755 --- a/roles/copy-release-tools-scripts/files/release-tools/update_constraints.sh +++ b/roles/copy-release-tools-scripts/files/release-tools/update_constraints.sh @@ -125,7 +125,8 @@ else if git commit -a -m "update constraint for $dist_name to new release $VERSION $TAG_META -" -s; then +" -s --trailer="Generated-By:openstack/project-config:roles/copy-release-tools-scripts/files/release-tools/update_constraints.sh" + then echo "Sleeping 10 minutes to avoid issues with the pypi cache" sleep 600 git show