@sentry/junior-github 0.62.0 → 0.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,23 +8,18 @@ Install it alongside `@sentry/junior`:
8
8
  pnpm add @sentry/junior @sentry/junior-github
9
9
  ```
10
10
 
11
- Register the trusted plugin from app code:
11
+ Add the plugin factory to the plugin set exported from `plugins.ts`:
12
12
 
13
13
  ```ts
14
- import { createApp } from "@sentry/junior";
14
+ import { defineJuniorPlugins } from "@sentry/junior";
15
15
  import { githubPlugin } from "@sentry/junior-github";
16
16
 
17
- const app = await createApp({
18
- plugins: [
19
- githubPlugin({
20
- botNameEnv: "GITHUB_APP_BOT_NAME",
21
- botEmailEnv: "GITHUB_APP_BOT_EMAIL",
22
- }),
23
- ],
24
- });
17
+ export const plugins = defineJuniorPlugins([
18
+ githubPlugin({
19
+ botNameEnv: "GITHUB_APP_BOT_NAME",
20
+ botEmailEnv: "GITHUB_APP_BOT_EMAIL",
21
+ }),
22
+ ]);
25
23
  ```
26
24
 
27
- Also list `@sentry/junior-github` in `juniorNitro({ plugins: { packages: [...] } })`
28
- so Nitro bundles the manifest and bundled GitHub skill.
29
-
30
25
  Full setup guide: https://junior.sentry.dev/extend/github-plugin/
package/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
- import type { JuniorPlugin } from "@sentry/junior-plugin-api";
1
+ import type { JuniorPluginRegistration } from "@sentry/junior-plugin-api";
2
2
 
3
3
  export interface GitHubPluginOptions {
4
4
  botEmailEnv?: string;
5
5
  botNameEnv?: string;
6
6
  }
7
7
 
8
- /** Register trusted GitHub runtime hooks for commit attribution and package loading. */
9
- export function githubPlugin(options?: GitHubPluginOptions): JuniorPlugin;
8
+ /** Register GitHub manifest content and trusted commit attribution hooks. */
9
+ export function githubPlugin(
10
+ options?: GitHubPluginOptions,
11
+ ): JuniorPluginRegistration;
package/index.js CHANGED
@@ -84,9 +84,42 @@ export function githubPlugin(options = {}) {
84
84
  const botEmailEnv = options.botEmailEnv ?? "GITHUB_APP_BOT_EMAIL";
85
85
 
86
86
  return defineJuniorPlugin({
87
- name: "github",
88
- pluginConfig: {
89
- packages: ["@sentry/junior-github"],
87
+ packageName: "@sentry/junior-github",
88
+ manifest: {
89
+ name: "github",
90
+ description:
91
+ "GitHub issue, pull request, and repository workflows via GitHub App",
92
+ configKeys: ["org", "repo"],
93
+ envVars: {
94
+ GITHUB_APP_BOT_NAME: {},
95
+ GITHUB_APP_BOT_EMAIL: {},
96
+ },
97
+ credentials: {
98
+ type: "github-app",
99
+ domains: ["api.github.com", "github.com"],
100
+ authTokenEnv: "GITHUB_TOKEN",
101
+ authTokenPlaceholder: "ghp_host_managed_credential",
102
+ appIdEnv: "GITHUB_APP_ID",
103
+ privateKeyEnv: "GITHUB_APP_PRIVATE_KEY",
104
+ installationIdEnv: "GITHUB_INSTALLATION_ID",
105
+ },
106
+ commandEnv: {
107
+ GIT_AUTHOR_NAME: "${GITHUB_APP_BOT_NAME}",
108
+ GIT_AUTHOR_EMAIL: "${GITHUB_APP_BOT_EMAIL}",
109
+ GIT_COMMITTER_NAME: "${GITHUB_APP_BOT_NAME}",
110
+ GIT_COMMITTER_EMAIL: "${GITHUB_APP_BOT_EMAIL}",
111
+ },
112
+ target: {
113
+ type: "repo",
114
+ configKey: "repo",
115
+ commandFlags: ["--repo", "-R"],
116
+ },
117
+ runtimeDependencies: [
118
+ {
119
+ type: "system",
120
+ package: "gh",
121
+ },
122
+ ],
90
123
  },
91
124
  hooks: {
92
125
  async sandboxPrepare(ctx) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-github",
3
- "version": "0.62.0",
3
+ "version": "0.64.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -20,11 +20,10 @@
20
20
  "files": [
21
21
  "index.d.ts",
22
22
  "index.js",
23
- "plugin.yaml",
24
23
  "skills",
25
24
  "SETUP.md"
26
25
  ],
27
26
  "dependencies": {
28
- "@sentry/junior-plugin-api": "0.62.0"
27
+ "@sentry/junior-plugin-api": "0.64.0"
29
28
  }
30
29
  }
package/plugin.yaml DELETED
@@ -1,38 +0,0 @@
1
- name: github
2
- description: GitHub issue, pull request, and repository workflows via GitHub App
3
-
4
- config-keys:
5
- - org
6
- - repo
7
-
8
- env-vars:
9
- GITHUB_APP_BOT_NAME:
10
- GITHUB_APP_BOT_EMAIL:
11
-
12
- credentials:
13
- type: github-app
14
- domains:
15
- - api.github.com
16
- - github.com
17
- auth-token-env: GITHUB_TOKEN
18
- auth-token-placeholder: ghp_host_managed_credential
19
- app-id-env: GITHUB_APP_ID
20
- private-key-env: GITHUB_APP_PRIVATE_KEY
21
- installation-id-env: GITHUB_INSTALLATION_ID
22
-
23
- command-env:
24
- GIT_AUTHOR_NAME: ${GITHUB_APP_BOT_NAME}
25
- GIT_AUTHOR_EMAIL: ${GITHUB_APP_BOT_EMAIL}
26
- GIT_COMMITTER_NAME: ${GITHUB_APP_BOT_NAME}
27
- GIT_COMMITTER_EMAIL: ${GITHUB_APP_BOT_EMAIL}
28
-
29
- target:
30
- type: repo
31
- config-key: repo
32
- command-flags:
33
- - --repo
34
- - -R
35
-
36
- runtime-dependencies:
37
- - type: system
38
- package: gh