You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary of changes:
- Defer `git` command execution to the agent, and guide it to execute
only relevant commands.
- Suggest a better command to retrieve past commit upgrade messages.
- Enable limited network access, so that Github milestone and release
candidate versions can be retrieved.
- Improve the instructions for the inclusion of custom release note
links.
- Attach the suggested commit message as a workflow artifact, and
provide a script to retrieve it. This enables command line-based
development iterations.
You are an experienced maintainer helping to craft the squash commit message for PR #${prNumber} in the ${repository} repository.
113
+
You are an experienced maintainer helping to craft the squash commit message for a GitHub pull request.
114
+
115
+
Pull request metadata:
116
+
- Repository: ${repository}
117
+
- Number: ${prNumber}
118
+
- Title: ${title}
119
+
- Author: ${author}
120
+
- Base branch: ${baseRef} (${baseSha})
121
+
- Head branch: ${headRef} (${headSha})
122
+
123
+
Pull request description:
124
+
\`\`\`
125
+
${cleanedBody}
126
+
\`\`\`
127
127
128
128
Requirements:
129
129
1. Write the summary line in the imperative mood. Try not to exceed 80 characters.
@@ -137,19 +137,43 @@ jobs:
137
137
9. Never split URLs across multiple lines, even if they exceed 72 characters.
138
138
10. If the pull request description already contains a suitable commit message, prefer using that as-is.
139
139
140
+
To help you craft an appropriate commit message, execute the following commands to gather context:
141
+
142
+
1. Get the changed files:
143
+
\`\`\`
144
+
git diff --name-status ${baseSha}...${headSha}
145
+
\`\`\`
146
+
147
+
2. Get a diff excerpt (first 500 lines):
148
+
\`\`\`
149
+
git diff ${baseSha}...${headSha} | head -500
150
+
\`\`\`
151
+
152
+
${upgradeLibrary ? `3. Since this appears to be an upgrade PR for ${upgradeLibrary}, collect relevant past upgrade commit messages, and consider the general style of other recent upgrade commit messages:
Some further guidelines to help you craft good upgrade commit messages:
141
167
- Unless highly salient, don't summarize code changes made as part of the upgrade.
142
168
- Don't bother linking to anchors within changelogs or release notes; just link to the main page.
143
-
- For GitHub-hosted projects, always link to all relevant GitHub release pages, including those for intermediate versions.
144
-
- This includes milestones and release candidates; if necessary, use the GitHub API to identify these.
145
-
- Libraries that often use milestone and release candidates include, but are not limited to:
146
-
- Jackson
147
-
- JUnit
148
-
- Micrometer
149
-
- Project Reactor
150
-
- Spring Framework
151
-
- Spring Boot
152
-
- Spring Security
169
+
- For GitHub-hosted projects, always link to all relevant GitHub release pages, including those for milestones, release candidates and other intermediate versions. This is especially important for major and minor version upgrades of the following libraries:
170
+
- Jackson
171
+
- JUnit
172
+
- Micrometer
173
+
- Project Reactor
174
+
- Spring Framework
175
+
- Spring Boot
176
+
- Spring Security
153
177
- For GitHub-hosted projects, always link to the full diff between versions.
154
178
- Enumerate links in the following order:
155
179
1. First, link to custom release note documents.
@@ -159,12 +183,15 @@ jobs:
159
183
- When the Maven \u0060version.error-prone-orig\u0060 property is changed, this upgrades both Error Prone and Picnic's Error Prone fork. In this case:
160
184
- Make sure that the commit message includes a diff URL for the latter.
161
185
- Don't explicitly mention that \u0060version.error-prone-orig\u0060 got changed; just focus on the fact that Error Prone is being upgraded.
162
-
- If the example upgrade commits shown below don't include at least one upgrade of the same dependency being upgraded in this pull request, check the full Git history to find relevant past upgrade commit messages to mimic.
163
186
- For major and minor version upgrades, check past dependency upgrade commit messages to infer documentation, blog or wiki URLs to which to link. Do this for at least the following libraries:
- Spring Framework: https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-{version}-Release-Notes
189
+
- Spring Boot: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-{version}-Release-Notes
190
+
- Spring Security: https://docs.spring.io/spring-security/reference/{version}/whats-new.html
191
+
- If you really can't find relevant URLs to reference, and there's nothing else to say, it's acceptable to have a commit message that only consists of the summary line.
192
+
193
+
Note that your network access is limited to the following domains; don't attempt \`curl\` or \`wget\` commands to other hosts:
0 commit comments