Skip to content

Latest commit

 

History

History

trigger-github-issues-from-crashlytics

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Trigger GitHub issues from Crashlytics

Author: Hideki TSURUOKA (https://github.com/htsuruo)

Description: Automatically creates GitHub Issues triggered by Crashlytics alerts.

Details: By using this extension, you can create GitHub Issues on a selected repository, and attach required labels, triggered by new Crashlytics alerts.

This extension streamlines the creation of content outlined in the Firebase Alerts triggers section of the official Firebase documentation. It eliminates the need to manually create service accounts or configure Cloud Functions. Just install the extension, and with a single click, you're all set up.

The features of this extension are as follows:

  • Automatically create a GitHub issue if a new Crashlytics issue occurs using the GitHub API.
  • Allow developers to set multiple required labels (e.g., bugs, crashlytics) for issues.
Crashlytics Issue GitHub Issue
SCR-20230529-ukgw-2 SCR-20230529-ukml

Supported crashlytics alerts

  • crashlytics.newFatalIssue: An event is sent when an application experiences a new fatal crash (not for any subsequent, identical events).
  • crashlytics.newNonfatalIssue: An event is sent when an application experiences a new non-fatal error (not for any subsequent, identical events).
  • crashlytics.newAnrIssue: An event is sent when an application experiences a new Application Not Responding (ANR) error (not for any subsequent, identical events).

Not supported (Future work)

  • crashlytics.regression: An event is sent when an application experiences a crash for an issue marked as closed for a previous application version.
  • crashlytics.stabilityDigest: An event is sent when there is a notification of the top trending issues in Crashlytics.
  • crashlytics.velocity: An event is sent when a single issue is responsible for causing a significant number of application sessions to crash.

Additional setup

Before installing this extension, make sure that you've created a personal access token in your GitHub account to access the GitHub API(if your repository is organization, use GitHub Apps).

Two approaches exist for creating access tokens, but Fine-grained personal access tokens are recommended.

Permissions

When creating a PAT (Personal Access Token), you need to give it the following permission: repository permissions > Issues > Read and write

SCR-20230527-ogal-2

Billing

This extension uses other Firebase or Google Cloud Platform services which may have associated charges:

  • Cloud Functions
  • Cloud Secret Manager
  • Crashlytics

When you use Firebase Extensions, you're only charged for the underlying resources that you use. A paid-tier billing plan is only required if the extension uses a service that requires a paid-tier plan, for example calling to a Google Cloud Platform API or making outbound network requests to non-Google services. All Firebase services offer a free tier of usage. Learn more about Firebase billing.

Configuration Parameters:

  • GitHub access token for your repository: Use PAT(Personal Access Token) or GitHub Apps Token

  • The owner or organization name for your repository

  • The name of your repository for creating issues

  • Labels to associate with the issue: The param requires camma(,) separated format Only users with push access can set labels for new issues. Labels are silently dropped otherwise.

  • The selection of alert type you want to trigger

  • Cloud Functions location: Where do you want to deploy the functions created for this extension? For help selecting a location, refer to the location selection guide.

Other Resources:

  • createFatalIssue (firebaseextensions.v1beta.v2function)

  • createNonFatalIssue (firebaseextensions.v1beta.v2function)

  • createAnrIssue (firebaseextensions.v1beta.v2function)

APIs Used:

  • eventarc.googleapis.com (Reason: Powers all events and triggers)

  • run.googleapis.com (Reason: Powers 2nd-gen functions)

Access Required:

This extension will operate with the following project IAM roles:

  • firebasecrashlytics.viewer (Reason: Allows the extension to read Crashlytics reports.)

  • eventarc.eventReceiver (Reason: Allows the extension to trigger on alerts.)