Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: coderabbitai/bitbucket
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.4
Choose a base ref
...
head repository: coderabbitai/bitbucket
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.0.5
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Sep 27, 2024

  1. 🔨 Add script for patching version and creating release

    NatoBoram committed Sep 27, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    NatoBoram Nato Boram
    Copy the full SHA
    4cdda29 View commit details
  2. 🏷️ Manually update types for pr:comment:edited (#7)

    NatoBoram authored Sep 27, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3159979 View commit details
  3. 🔖 v1.0.5

    NatoBoram committed Sep 27, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    NatoBoram Nato Boram
    Copy the full SHA
    ff81b2d View commit details
Showing with 65 additions and 8 deletions.
  1. +1 −1 package.json
  2. +19 −0 scripts/pnpm_version_patch.sh
  3. +45 −7 src/server/webhooks/events/pr/comment_edited.ts
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coderabbitai/bitbucket",
"version": "1.0.4",
"version": "1.0.5",
"description": "CodeRabbit's TypeScript API client for connecting to Bitbucket Cloud and Bitbucket Data Center",
"keywords": [
"bitbucket-api-v1",
19 changes: 19 additions & 0 deletions scripts/pnpm_version_patch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

VERSION=$(pnpm version patch --no-git-tag-version)

echo 'Do you want to publish @coderabbitai/bitbucket@'$VERSION'? (y/n) '
read Y
if [ "$Y" = "y" ]; then
echo "Publishing version $VERSION"
else
git checkout -- package.json
exit 1
fi

git commit --all --message "🔖 $VERSION"
git tag --annotate --message "🔖 $VERSION" --sign $VERSION
git push
git push --tags

gh release create $VERSION --generate-notes --title $VERSION --verify-tag
52 changes: 45 additions & 7 deletions src/server/webhooks/events/pr/comment_edited.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,50 @@
import type {
SchemaApplicationUser,
SchemaProject,
SchemaPullRequestParticipant,
SchemaRepository,
SchemaRestMinimalRef,
} from "../../../openapi/openapi-typescript.js"

export interface Actor {
readonly active: boolean
readonly displayName: string
readonly emailAddress: string
readonly id: number
readonly links: ActorLinks
readonly name: string
readonly slug: string
readonly type: string
readonly type: SchemaApplicationUser["type"]
}

export interface ActorLinks {
readonly self: Self[]
}

export interface Author {
readonly approved: boolean
readonly role: string
readonly status: string
readonly role: SchemaPullRequestParticipant["role"]
readonly status: SchemaPullRequestParticipant["status"]
readonly user: Actor
}

export interface Clone {
readonly href: string
readonly name: string
}

export interface Comment {
readonly author: Actor
readonly comments: unknown[]
readonly createdDate: number
readonly id: number
readonly properties: Properties
readonly tasks: unknown[]
readonly severity: string
readonly state: string
readonly text: string
readonly threadResolved: boolean
readonly threadResolvedDate: number
readonly threadResolver: Actor
readonly updatedDate: number
readonly version: number
}
@@ -34,7 +56,7 @@ export interface PRCommentEdited {
/** The comment edited. */
readonly comment: Comment
/** Id of the parent comment if one exists. */
readonly commentParentId: number
readonly commentParentId?: number
readonly date: string
readonly eventKey: "pr:comment:edited"
/** Text of the previous comment. */
@@ -46,9 +68,10 @@ export interface PRCommentEdited {
export interface Project {
readonly id: number
readonly key: string
readonly links: ActorLinks
readonly name: string
readonly public: boolean
readonly type: string
readonly type: SchemaProject["type"]
}

export interface Properties {
@@ -59,9 +82,11 @@ export interface PullRequest {
readonly author: Author
readonly closed: boolean
readonly createdDate: number
readonly description: string
readonly draft: boolean
readonly fromRef: Ref
readonly id: number
readonly links: ActorLinks
readonly locked: boolean
readonly open: boolean
readonly participants: unknown[]
@@ -78,16 +103,29 @@ export interface Ref {
readonly id: string
readonly latestCommit: string
readonly repository: Repository
readonly type: SchemaRestMinimalRef["type"]
}

export interface Repository {
readonly archived: boolean
readonly forkable: boolean
readonly hierarchyId: string
readonly id: number
readonly links: RepositoryLinks
readonly name: string
readonly project: Project
readonly public: boolean
readonly scmId: string
readonly slug: string
readonly state: string
readonly state: SchemaRepository["state"]
readonly statusMessage: string
}

export interface RepositoryLinks {
readonly clone: Clone[]
readonly self: Self[]
}

export interface Self {
readonly href: string
}