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
This commit is contained in:
Jeremy Stanley
2025-05-23 16:08:13 +00:00
parent a8d849d426
commit 9057be2b91
5 changed files with 11 additions and 6 deletions

View File

@@ -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 <<EOF
$COMMIT_MSG
EOF

View File

@@ -69,6 +69,7 @@ spaces=$(grep unreleased releasenotes/source/index.rst | sed -e 's/\w//g')
sed --in-place -e "/unreleased/s/unreleased/unreleased\n${spaces}${SERIES}/" releasenotes/source/index.rst
git add releasenotes/source/index.rst releasenotes/source/${SERIES}.rst
git diff
git commit -m "$commit_msg" -s
git commit -m "$commit_msg" -s \
--trailer="Generated-By:openstack/project-config:roles/copy-release-tools-scripts/files/release-tools/add_release_note_page.sh"
git show
git review -t "reno-${SERIES}" --yes

View File

@@ -45,6 +45,7 @@ unmaintained/${SERIES}.
sed --in-place -e "s/stable\/${SERIES}/unmaintained\/${SERIES}/" releasenotes/source/${SERIES}.rst
git add releasenotes/source/${SERIES}.rst
git diff
git commit -m "$commit_msg" -s
git commit -m "$commit_msg" -s \
--trailer="Generated-By:openstack/project-config:roles/copy-release-tools-scripts/files/release-tools/change_reno_branch_to_unmaintained.sh"
git show
git review -t "reno-eom-${SERIES}" --yes

View File

@@ -66,7 +66,8 @@ function update_gitreview {
defaultbranch=$branch"
echo "$grcontents" > .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

View File

@@ -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