Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Bugfix - Deactivate comenting on bot PRs #388

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

baristaGeek
Copy link
Collaborator

Description

A user reported he wouldn't like this to happen. We solve this by returning 400 if PR author user type is a bot

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Chore: cleanup/renaming, etc
  • RFC

Notes

Acceptance

Copy link

vercel bot commented Nov 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
watermelon ✅ Ready (Inspect) Visit Preview Nov 20, 2023 8:06pm

WatermelonAI Summary

This PR fixes a bug where comments were allowed on bot PRs. It returns a 400 error if the PR author is a bot. The PR has been tested on both bot and non-bot PRs and the behavior is as expected. Acceptance criteria and guidelines have been followed.

GitHub PRs

Click here to login to Jira
Click here to login to Confluence
Click here to login to Slack
No results found in Notion Pages :(

No results found in Linear Tickets :(

Click here to login to Asana
watermelon is an open repo and Watermelon will serve it for free.
🍉🫶
Try us on VSCode!

@@ -66,6 +66,12 @@ export async function POST(request: Request) {

const octokit = await app.getInstallationOctokit(installationId);

if (pull_request.user.type === "Bot") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it uppercase?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it's uppercase. You can verify that by trying this out with a lowercase on watermelontools/watermelon-intellij#66

Copy link
Member

@EstebanDalelR EstebanDalelR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's "bot"

@baristaGeek baristaGeek merged commit 073cea3 into dev Nov 21, 2023
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants