Skip to content

Commit 7b3a90c

Browse files
Ensure dependabot changelog files are unique (#4333)
* Ensure dependabot changelog files are unique * add changelog * Update changelog/jcolvin-bot-changelog-fix.md Co-authored-by: Igor Braga <5835477+bragaigor@users.noreply.github.com> --------- Co-authored-by: Igor Braga <5835477+bragaigor@users.noreply.github.com>
1 parent 66f7288 commit 7b3a90c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.github/workflows/automated-changelog.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,9 @@ jobs:
2525
2626
const dir = 'changelog';
2727
28-
// Find the next available number
29-
let x = 1;
30-
while (fs.existsSync(path.join(dir, `dependabot-${x}.md`))) {
31-
x++;
32-
}
28+
const prNumber = context.payload.pull_request.number;
29+
const filename = path.join(dir, `dependabot-${prNumber}.md`);
3330
34-
const filename = path.join(dir, `dependabot-${x}.md`);
3531
const title = context.payload.pull_request.title;
3632
const content = `### Ignored\n- ${title}\n`;
3733
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### Ignored
2+
- ensure dependabot changelog files are unique

0 commit comments

Comments
 (0)