Skip to content

Commit

Permalink
Merge branch 'keyshade-xyz:develop' into PLATFORM-Rollback-Secrets-ke…
Browse files Browse the repository at this point in the history
  • Loading branch information
anaypurohit0907 authored Feb 23, 2025
2 parents ba328ef + d8c58fe commit f3121fd
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 17 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/auto-assign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,32 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const comment = context.payload.comment;
const issue = context.issue;
const issue = context.payload.issue;
const owner = 'keyshade-xyz';
const repo = 'keyshade';
const userMaxConcurrentIssueCount = process.env.USER_MAX_CONCURRENT_ISSUE_COUNT || 5;
async function listIssueEvents(issue) {
const allEvents = [];
async function listIssueEvents(issueNumber) {
const events = [];
let page = 1;
let hasNextPage = true;
while (hasNextPage) {
const issuesResponse = await github.rest.issues.listEventsForTimeline({
const eventsResponse = await github.rest.issues.listEventsForTimeline({
owner,
repo,
issue_number: issue.number,
issue_number: issueNumber,
per_page: 100,
page
});
allEvents.push(...issuesResponse.data);
events.push(...eventsResponse.data);
hasNextPage = issuesResponse.headers.link && issuesResponse.headers.link.includes('rel="next"');
hasNextPage = eventsResponse.headers.link && eventsResponse.headers.link.includes('rel="next"');
page++;
}
return allEvents;
return events;
}
async function listUserOpenIssuesWithoutActivePullRequest(user) {
Expand All @@ -55,7 +55,7 @@ jobs:
});
for (const issue of userOpenIssues) {
const events = await listIssueEvents(issue);
const events = await listIssueEvents(issue.number);
const userPullRequestIssues = events
.filter(event => event.event === 'cross-referenced')
.map(event => event.source.issue)
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## [2.12.0-stage.15](https://github.com/keyshade-xyz/keyshade/compare/v2.12.0-stage.14...v2.12.0-stage.15) (2025-02-23)

### 🐛 Bug Fixes

* **api:** Added import statement for crypto module ([#789](https://github.com/keyshade-xyz/keyshade/issues/789)) ([f6ddf0f](https://github.com/keyshade-xyz/keyshade/commit/f6ddf0fc54280c9844143ac42840fcbde1438b23))

## [2.12.0-stage.14](https://github.com/keyshade-xyz/keyshade/compare/v2.12.0-stage.13...v2.12.0-stage.14) (2025-02-23)

### 🐛 Bug Fixes

* **api:** Issue fetched via API ([#788](https://github.com/keyshade-xyz/keyshade/issues/788)) ([b373eeb](https://github.com/keyshade-xyz/keyshade/commit/b373eeb5974ee61bd07ce586da4b56dbd0d10fab))

## [2.12.0-stage.13](https://github.com/keyshade-xyz/keyshade/compare/v2.12.0-stage.12...v2.12.0-stage.13) (2025-02-23)

### 🐛 Bug Fixes

* **platform:** Add graceful fallback in error parsing ([a59de60](https://github.com/keyshade-xyz/keyshade/commit/a59de60e40b6f3617a4278837e0c63fcb5752d16))

## [2.12.0-stage.12](https://github.com/keyshade-xyz/keyshade/compare/v2.12.0-stage.11...v2.12.0-stage.12) (2025-02-22)

### 🚀 Features
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/common/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { UserAuthenticatedResponse } from '@/auth/auth.types'
import { UserWithWorkspace } from '@/user/user.types'
import { Otp, PrismaClient, User } from '@prisma/client'
import { Response } from 'express'
import * as crypto from 'crypto'

/**
* Limits the given limit to a maximum number of items per page.
Expand Down
20 changes: 13 additions & 7 deletions apps/platform/src/hooks/use-http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,20 @@ export function useHttp<T, V extends ClientResponse<T>>(
handle403()
} else if (statusCode.toString().startsWith('4')) {
// For 4xx errors
const { header, body } = JSON.parse(response.error.message) as {
header: string
body: string
}
try {
const { header, body } = JSON.parse(response.error.message) as {
header: string
body: string
}

toast.error(header, {
description: body
})
toast.error(header, {
description: body
})
} catch (error) {
toast.error('Faced an error processing your request', {
description: response.error.message
})
}
} else if (statusCode === 500) {
handle500(response.error)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "keyshade-xyz",
"version": "2.12.0-stage.12",
"version": "2.12.0-stage.15",
"license": "MPL-2.0",
"private": true,
"engineStrict": false,
Expand Down

0 comments on commit f3121fd

Please sign in to comment.