Skip to content

Commit e521a24

Browse files
authored
ci: unify auto-update PR title and description format (#1213)
Brings the PRs opened by the `Regenerate models` workflow to the same format as the matching workflows in apify-client-js and crawlee-python. - Titles follow `chore: <Verb> <object>`. - Descriptions are short bullet lists wrapped at 72 columns, so the squash commit body reads well in `git log`. No blockquotes. - A footer names the workflow and links its run. *✍️ Drafted by Claude Code*
1 parent 41c6f39 commit e521a24

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

‎.github/workflows/on_schedule_regenerate_models.yaml‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ jobs:
160160
if: steps.commit.outputs.committed == 'true'
161161
env:
162162
GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
163-
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/workflows/on_schedule_regenerate_models.yaml
163+
WORKFLOW_NAME: ${{ github.workflow }}
164+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
164165
PREVIOUS_SPEC_VERSION: ${{ steps.previous-spec.outputs.version }}
165166
run: |
166167
SPEC_VERSION=$(uv run python -m scripts.openapi_spec recorded-version)
@@ -169,19 +170,19 @@ jobs:
169170
# `components/version.yaml` in a follow-up `[skip ci]` commit and a deploy can publish new content under
170171
# the old stamp. Say which case this is instead of letting the reviewer read it as a content identity.
171172
if [[ "$SPEC_VERSION" == "$PREVIOUS_SPEC_VERSION" ]]; then
172-
SPEC_LINE="- Specification version: \`${SPEC_VERSION}\` - **unchanged**, which doesn't rule out a specification change: the published stamp can lag its content by a deploy. Only the diff tells."
173+
SPEC_LINE="- Spec version: \`${SPEC_VERSION}\` (unchanged, but it can lag)."
173174
else
174-
SPEC_LINE="- Specification version: \`${PREVIOUS_SPEC_VERSION}\` -> \`${SPEC_VERSION}\`."
175+
SPEC_LINE="- Spec version: \`${PREVIOUS_SPEC_VERSION}\` -> \`${SPEC_VERSION}\`."
175176
fi
176177
177178
BODY=$(printf '%s\n' \
178-
"- Regenerates the Pydantic models, TypedDicts, and literal aliases from the [published OpenAPI specification](https://docs.apify.com/api/openapi.json), and records its version in \`pyproject.toml\`." \
179+
"- Regenerate Pydantic models, TypedDicts and literal aliases from the" \
180+
" published OpenAPI spec." \
179181
"${SPEC_LINE}" \
182+
"- Retitle to \`fix:\` or \`feat:\` if the diff is user-facing." \
180183
"" \
181-
"> [!IMPORTANT]" \
182-
"> Retitle this pull request to \`fix:\` or \`feat:\` when the diff is user-facing, so that it lands in the changelog and triggers a release - \`chore:\` does neither." \
183-
"" \
184-
"> Generated by the [Regenerate models](${WORKFLOW_URL}) workflow.")
184+
"Generated by the \"${WORKFLOW_NAME}\" workflow:" \
185+
"${RUN_URL}")
185186
186187
gh pr create \
187188
--title "$PR_TITLE" \

0 commit comments

Comments
 (0)