forked from segmentio/analytics_flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
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/fhdeodato/analytics_flutter
- Loading branch information
Showing
21 changed files
with
193 additions
and
114 deletions.
There are no files selected for viewing
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,39 @@ | ||
name: Create Jira Ticket | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
create_jira: | ||
name: Create Jira Ticket | ||
runs-on: ubuntu-latest | ||
environment: IssueTracker | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
- name: Login | ||
uses: atlassian/gajira-login@master | ||
env: | ||
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | ||
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | ||
JIRA_API_TOKEN: ${{ secrets.JIRA_TOKEN }} | ||
JIRA_EPIC_KEY: ${{ secrets.JIRA_EPIC_KEY }} | ||
JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }} | ||
|
||
- name: Create | ||
id: create | ||
uses: atlassian/gajira-create@master | ||
with: | ||
project: ${{ secrets.JIRA_PROJECT }} | ||
issuetype: Bug | ||
summary: | | ||
[${{ github.event.repository.name }}] (${{ github.event.issue.number }}): ${{ github.event.issue.title }} | ||
description: | | ||
Github Link: ${{ github.event.issue.html_url }} | ||
${{ github.event.issue.body }} | ||
fields: '{"parent": {"key": "${{ secrets.JIRA_EPIC_KEY }}"}}' | ||
|
||
- name: Log created issue | ||
run: echo "Issue ${{ steps.create.outputs.issue }} was created" |
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
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,17 @@ | ||
import 'package:segment_analytics/event.dart'; | ||
import 'package:segment_analytics/plugin.dart'; | ||
|
||
class InjectToken extends PlatformPlugin { | ||
InjectToken(this.token) : super(PluginType.before); | ||
|
||
final String token; | ||
|
||
@override | ||
Future<RawEvent> execute(RawEvent event) async { | ||
// We need to get the Context in a concurrency safe mode to permit changes to make it in before we retrieve it | ||
final context = await analytics!.state.context.state; | ||
context!.device.token = token; | ||
event.context = context; | ||
return event; | ||
} | ||
} |
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
Oops, something went wrong.