intuit / intuit/auto

Released posting multiple comments on PR

Open
#2,185 0 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2.5k
Forks
221
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When using the `Released` plugin it will post a comment on the PR for every commit that appears on the main branch. This works when using a merge or squash workflow. However when using a rebasing workflow you end up a number of comments on the PR equal to the number of commits.

**To Reproduce**

Enable the `Released` plugin. Create a PR with multiple commits. Rebase the PR onto main via GitHub.

**Expected behavior**

Only a single comment should be added to each PR.

**Screenshots**

Example PR Log
```txt
✔ success Commented on PR #14
✔ success Commented on PR #14
✔ success Commented on PR #14
... Repeats 10 times...
✔ success Commented on PR #14
✔ success Commented on PR #19
✔ success Commented on PR #14
✔ success Commented on PR #14
✔ success Commented on PR #18
✔ success Commented on PR #16
✔ success Commented on PR #17
✔ success Commented on PR #15
```

**Environment information:**

```txt
"auto" version: v10.36.5
"git" version: v2.32.0 (Apple Git-132)
"node" version: v17.7.1
```

**Additional context**

Looking at the code it appears that the the `auto.comment` call in the released plugin doesn't include the `edit` flag to ensure it will edit previous comments. `https://github.com/intuit/auto/blob/a00c3d9f8ca1c0fc54e5f5bed20c7d5bfbcf7c29/plugins/released/src/index.ts#L229`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.