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
// If we want to backport this to the current branch, the backlog entry should only exist in the ./.changes/current directory
151
-
if (currentBackportLabel) {
152
-
if (devChangesPresent) {
153
-
await createOrUpdateChangelogComment("Please move the changelog entry from `./.changes/dev` to `./.changes/current` for this change. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.");
154
-
return;
155
-
}
156
174
157
-
if (nextChangesPresent) {
158
-
await createOrUpdateChangelogComment("Please move the changelog entry from `./.changes/next` to `./.changes/current` for this change. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.");
159
-
return;
160
-
}
161
-
162
-
if (!currentChangesPresent) {
163
-
await createOrUpdateChangelogComment("Please add a changelog entry to `./.changes/current` for this change. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.");
164
-
return;
165
-
}
166
-
167
-
// If we have no current backport label, but a next backport label we should only have a changelog entry in the ./.changes/next directory
168
-
} else if (nextBackportLabel) {
169
-
if (devChangesPresent) {
170
-
await createOrUpdateChangelogComment("Please move the changelog entry from `./.changes/dev` to `./.changes/next` for this change. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.");
171
-
return;
172
-
}
173
-
174
-
if (currentChangesPresent) {
175
-
await createOrUpdateChangelogComment("Please move the changelog entry from `./.changes/current` to `./.changes/next` for this change. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.");
176
-
return;
177
-
}
178
-
179
-
180
-
if (!nextChangesPresent) {
181
-
await createOrUpdateChangelogComment("Please add a changelog entry to `./.changes/next` for this change. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.");
182
-
return;
183
-
}
184
-
185
-
// If we don't have a backport label we only expect changes in the ./.changes/dev directory
186
-
} else {
187
-
if (nextChangesPresent) {
188
-
await createOrUpdateChangelogComment("Please move the changelog entry from `./.changes/next` to `./.changes/dev` for this change. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.");
189
-
return;
190
-
}
191
-
192
-
if (currentChangesPresent) {
193
-
await createOrUpdateChangelogComment("Please move the changelog entry from `./.changes/current` to `./.changes/dev` for this change. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.");
194
-
return;
195
-
}
175
+
if (missingChangelogEntry) {
176
+
await createOrUpdateChangelogComment(`Please add a changelog entry for in the .changes/v${onlyExpectedChangeVersion} folder. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.`);
177
+
return;
178
+
}
196
179
197
-
if (!devChangesPresent) {
198
-
await createOrUpdateChangelogComment("Please add a changelog entry to `./.changes/dev` for this change. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.");
199
-
return;
200
-
}
180
+
if (unexpectedChangelogEntry.length > 0) {
181
+
await createOrUpdateChangelogComment(`Please remove the changelog entry for the following paths: ${unexpectedChangelogEntry.join(", ")}. If you believe this change does not need a changelog entry, please add the 'no-changelog-needed' label.`);
182
+
return;
201
183
}
202
184
203
185
// Nothing to complain about, so delete any existing comment
0 commit comments