Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 207deb7

Browse files
committed
chore: implementing OIDC callbacks and flow detection
chore: first approach to OIDC integration chore: linter warnings chore: add jira auto-closing automation - MCP-102 (#441) chore: add jira auto-closing automation - MCP-102 (#441) chore: fix apix action version (#448) chore: fix linter checks chore: fix tests and eslint config Ignores any javascript or typescript file that is a test fixture. chore: more clean up chore: add test for token refresh chore: fix tests and eslint checks
1 parent b01f267 commit 207deb7

File tree

21 files changed

+706
-84
lines changed

21 files changed

+706
-84
lines changed

‎.github/workflows/jira-issue.yml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
---
2-
name: Create JIRA ticket for new issues
2+
# This workflow automatically creates JIRA tickets when GitHub issues are opened
3+
# and closes JIRA tickets when GitHub issues are closed.
4+
#
5+
# Required secrets:
6+
# - JIRA_API_TOKEN: Your JIRA API token
7+
#
8+
name: Create and close JIRA tickets for GitHub issues
39

410
on:
511
issues:
6-
types: [opened, labeled]
12+
types: [opened, labeled, closed]
713

814
permissions:
915
issues: write
@@ -70,3 +76,37 @@ jobs:
7076
} catch (error) {
7177
console.log('⚠️ Could not remove create-jira label:', error.message);
7278
}
79+
80+
close_jira_task:
81+
name: Close Jira issue
82+
runs-on: ubuntu-latest
83+
if: github.event.action == 'closed'
84+
steps:
85+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
86+
with:
87+
config: ${{ vars.PERMISSIONS_CONFIG }}
88+
89+
- name: Find JIRA ticket by GitHub issue number
90+
id: find_jira
91+
uses: mongodb/apix-action/find-jira@v13
92+
with:
93+
token: ${{ secrets.JIRA_API_TOKEN }}
94+
jql: "project = MCP AND description ~ '${{ github.event.issue.html_url }}'"
95+
96+
- name: Close JIRA ticket
97+
if: steps.find_jira.outputs.found == 'true'
98+
uses: mongodb/apix-action/transition-jira@v13
99+
id: close_jira_ticket
100+
continue-on-error: true
101+
with:
102+
token: ${{ secrets.JIRA_API_TOKEN }}
103+
issue-key: ${{ steps.find_jira.outputs.issue-key }}
104+
transition-id: 1381 # Resolved
105+
resolution: Fixed
106+
- name: Add closure comment
107+
if: steps.close_jira_ticket.outcome == 'success'
108+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
109+
with:
110+
issue-number: ${{ github.event.issue.number }}
111+
body: |
112+
The corresponding JIRA ticket has been automatically closed.

‎eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export default defineConfig([
6464
"eslint.config.js",
6565
"vitest.config.ts",
6666
"src/types/*.d.ts",
67+
"tests/integration/fixtures/",
6768
]),
6869
eslintPluginPrettierRecommended,
6970
]);

‎package-lock.json

Lines changed: 82 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@
6161
"@ai-sdk/openai": "^1.3.23",
6262
"@eslint/js": "^9.30.1",
6363
"@modelcontextprotocol/inspector": "^0.16.0",
64+
"@mongodb-js/oidc-mock-provider": "^0.11.3",
6465
"@redocly/cli": "^1.34.4",
6566
"@types/express": "^5.0.1",
6667
"@types/http-proxy": "^1.17.16",
6768
"@types/node": "^24.0.12",
6869
"@types/proper-lockfile": "^4.1.4",
70+
"@types/semver": "^7.7.0",
6971
"@types/simple-oauth2": "^5.0.7",
7072
"@types/yargs-parser": "^21.0.3",
7173
"@vitest/coverage-v8": "^3.2.4",
@@ -81,6 +83,7 @@
8183
"openapi-typescript": "^7.8.0",
8284
"prettier": "^3.6.2",
8385
"proper-lockfile": "^4.1.2",
86+
"semver": "^7.7.2",
8487
"simple-git": "^3.28.0",
8588
"tsx": "^4.20.3",
8689
"typescript": "^5.8.3",

‎src/common/config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ function getLocalDataPath(): string {
151151
: path.join(os.homedir(), ".mongodb");
152152
}
153153

154-
export const defaultDriverOptions: ConnectionInfo["driverOptions"] = {
154+
export type DriverOptions = ConnectionInfo["driverOptions"];
155+
export const defaultDriverOptions: DriverOptions = {
155156
readConcern: {
156157
level: "local",
157158
},
@@ -345,8 +346,8 @@ export function setupDriverConfig({
345346
defaults,
346347
}: {
347348
config: UserConfig;
348-
defaults: ConnectionInfo["driverOptions"];
349-
}): ConnectionInfo["driverOptions"] {
349+
defaults: Partial<DriverOptions>;
350+
}): DriverOptions {
350351
const { driverOptions } = generateConnectionInfoFromCliArgs(config);
351352
return {
352353
...defaults,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /