You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This [code](functions/index.js) demonstrates how to use a Firebase Cloud Function triggered by an
4
+
[in-app feedback Firebase Alert from App Distribution](https://firebase.google.com/docs/functions/beta/reference/firebase-functions.alerts.appdistribution.inappfeedbackpayload),
5
+
and stores the feedback details (including screenshot) in Jira.
6
+
7
+
You can customize this code to work with your own Jira configuration (eg on-premise support, custom issue types, etc).
8
+
9
+
## Quickstart
10
+
11
+
This sample code uses Jira's built-in APIs to create issues for in-app tester feedback. For simplicity it uses [basic authorization](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/).
12
+
13
+
1.[Generate an API token](https://id.atlassian.com/manage-profile/security/api-tokens) via your Jira profile.
14
+
15
+
16
+
Note: If the tester who files feedback does not have a Jira account, the user who generates this token will be marked as the issue's reporter.
17
+
2. This [code](functions/index.js) uses [parameterized configuration](https://firebase.google.com/docs/functions/config-env#params) to prompt for the required configuratio. To start the process, run:
18
+
```bash
19
+
$ firebase deploy
20
+
```
21
+
This will store the `API_TOKEN` using [Google Cloud Secret Manager](https://cloud.google.com/secret-manager) and the remaining settings in an `.env` file which will contain the following variables, customized to your Jira project:
22
+
```bash
23
+
JIRA_URI="<your JIRA instance's URI, e.g. 'https://mysite.atlassian.net'>"
24
+
PROJECT_KEY="<your project's key, e.g. 'DEV'>"
25
+
ISSUE_TYPE_ID="<issue type ID; defaults to '10001' (Improvement)>"
26
+
ISSUE_LABEL="<label applied to the Jira issues created; defaults to 'in-app'>"
27
+
API_TOKEN_OWNER="<creator of the token; default reporter of issues>"
0 commit comments