-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/janus-idp/backstage-plugins …
…into ocm-table-sort
- Loading branch information
Showing
107 changed files
with
4,862 additions
and
57 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## @janus-idp/backstage-plugin-feedback-backend 1.0.0 (2024-01-18) | ||
|
||
|
||
### Features | ||
|
||
* **#1019:** implemented feedback plugin ([#1045](https://github.com/janus-idp/backstage-plugins/issues/1045)) ([34c312e](https://github.com/janus-idp/backstage-plugins/commit/34c312e3c8522e81d04621abdcb174c0ecb25733)), closes [#1019](https://github.com/janus-idp/backstage-plugins/issues/1019) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
approvers: | ||
- yashoswalyo | ||
- riginoommen | ||
- deshmukhmayur | ||
reviewers: | ||
- yashoswalyo | ||
- riginoommen | ||
- deshmukhmayur |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# Feedback Backend | ||
|
||
This is feedback-backend plugin which provides Rest API to create feedbacks. | ||
|
||
It is also repsonsible for creating JIRA tickets, | ||
|
||
## Getting started | ||
|
||
### Installation | ||
|
||
1. Install the backend plugin. | ||
|
||
```bash | ||
# From your backstage root directory | ||
yarn workspace backend add @janus-idp/backstage-plugin-feedback-backend | ||
``` | ||
|
||
2. Then create a new file `packages/backend/src/plugins/feedback.ts` and add the following: | ||
|
||
```ts | ||
import { Router } from 'express'; | ||
|
||
import { createRouter } from '@janus-idp/backstage-plugin-feedback-backend'; | ||
|
||
import { PluginEnvironment } from '../types'; | ||
|
||
export default async function createPlugin( | ||
env: PluginEnvironment, | ||
): Promise<Router> { | ||
return await createRouter({ | ||
logger: env.logger, | ||
config: env.config, | ||
discovery: env.discovery, | ||
}); | ||
} | ||
``` | ||
|
||
3. Next we wire this into overall backend router, edit `packages/backend/src/index.ts`: | ||
|
||
```ts | ||
import feedback from './plugins/feedback'; | ||
|
||
// ... | ||
async function main() { | ||
// ... | ||
const feedbackEnv = useHotMemoize(module, () => createEnv('feedback')); | ||
apiRouter.use('/feedback', await feedback(feedbackEnv)); | ||
} | ||
``` | ||
|
||
4. Now add below config in your `app-config.yaml` file. | ||
|
||
```yaml | ||
feedback: | ||
integrations: | ||
jira: | ||
# Under this object you can define multiple jira hosts | ||
- host: ${JIRA_HOST_URL} | ||
token: ${JIRA_TOKEN} | ||
|
||
email: | ||
## Email integration uses nodemailer to send emails | ||
host: ${EMAIL_HOST} | ||
port: ${EMAIL_PORT} # defaults to 587, if not found | ||
|
||
## Email address of sender | ||
from: ${EMAIL_FROM} | ||
|
||
## [optional] Authorization using user and password | ||
auth: | ||
user: ${EMAIL_USER} | ||
pass: ${EMAIL_PASS} | ||
|
||
# boolean | ||
secure: false | ||
|
||
# Path to ca certificate if required by mail server | ||
caCert: ${NODE_EXTRA_CA_CERTS} | ||
``` | ||
### Set up frontend plugin | ||
Follow instructions provided [feedback-plugin](../feedback/README.md) | ||
### API reference | ||
The API specifications file can be found at [docs/openapi3_0](./docs/openapi3_0.yaml) | ||
### Run | ||
1. Now run `yarn workspace @janus-idp/backstage-plugin-feedback-backedn start-backend`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
feedback: | ||
integrations: | ||
jira: | ||
# Under this object you can define multiple jira hosts | ||
- host: ${JIRA_HOST_URL} | ||
token: ${JIRA_TOKEN} | ||
|
||
email: | ||
## Email integration uses nodemailer to send emails | ||
host: ${EMAIL_HOST} | ||
port: ${EMAIL_PORT} # defaults to 587, if not found | ||
|
||
# Email address of sender | ||
from: ${EMAIL_FROM} | ||
|
||
## Authorization using user and password | ||
auth: | ||
user: ${EMAIL_USER} | ||
pass: ${EMAIL_PASS} | ||
|
||
# boolean | ||
secure: false | ||
|
||
# Path to ca certificate if required by mail server | ||
caCert: ${NODE_EXTRA_CA_CERTS} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/** | ||
* Configuration options for the application. | ||
*/ | ||
export interface Config { | ||
feedback?: { | ||
integrations: { | ||
/** | ||
* Configuration options for JIRA integration. | ||
* It is an array, which can be used to set up multiple jira servers at the same time. | ||
*/ | ||
jira?: Array<{ | ||
/** | ||
* The hostname or URL of the JIRA organization. | ||
*/ | ||
host: string; | ||
|
||
/** | ||
* The access token for authenticating with JIRA. | ||
*/ | ||
token: string; | ||
}>; | ||
|
||
/** | ||
* Configuration options for email integration. | ||
*/ | ||
email?: { | ||
/** | ||
* The SMTP server's hostname or IP address. | ||
*/ | ||
host: string; | ||
|
||
/** | ||
* The port number to use for the SMTP server. | ||
*/ | ||
port: number; | ||
|
||
/** | ||
* Optional authentication settings for the SMTP server. | ||
*/ | ||
auth?: { | ||
/** | ||
* The username to use for SMTP server authentication. | ||
*/ | ||
user?: string; | ||
|
||
/** | ||
* The password to use for SMTP server authentication. | ||
* @visibility secret | ||
*/ | ||
pass?: string; | ||
}; | ||
|
||
/** | ||
* Set to `true` if you want to use SSL/TLS for the SMTP connection. | ||
* Default is `false`. | ||
*/ | ||
secure?: boolean; | ||
|
||
/** | ||
* The email address from which emails will be sent. | ||
*/ | ||
from?: string; | ||
|
||
/** | ||
* Path to a custom CA certificate file. | ||
*/ | ||
caCert?: string; | ||
}; | ||
}; | ||
}; | ||
} |
Oops, something went wrong.