Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- START -->

# READ BEFORE SUBMITTING PR

- Run `scripts/build.sh` to create the bundles
- Run `scripts/copy-build-to-outputs.sh` to update outputs
This will help to see what downstream changes should look like
<!-- END -->

## Description

<!-- One Line Description -->

## Details

<!-- Bullet list of changes -->
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ npm-debug.log
.DS_Store
dist/
ts-to-es6/
.idea
outputs/
.idea
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scripts/sync-versions.sh
scripts/sync-versions.sh
2 changes: 2 additions & 0 deletions outputs/onesignal-ngx/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
example/
18 changes: 18 additions & 0 deletions outputs/onesignal-ngx/.github/ISSUE_TEMPLATE/ask-question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 🙋‍♂️ Ask a question
description: Tell us what's on your mind
title: '[Question]: '
labels: ['Question']

body:
- type: markdown
attributes:
value: |
Having issues integrating this SDK?
- type: textarea
id: question
attributes:
label: How can we help?
description: Specific question regarding integrating this SDK.
placeholder: How do I...?
validations:
required: true
68 changes: 68 additions & 0 deletions outputs/onesignal-ngx/.github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: 🪳 Bug report
description: File a bug report
title: '[Bug]: '
labels: ['Bug']

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Provide a thorough description of whats going on.
placeholder: The latest version of the SDK causes a runtime error.
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox
- Chrome (Chromium)
- Safari
- Microsoft Edge
- Opera
- Brave
- Other
validations:
required: true
- type: input
id: operating-system
attributes:
label: What operating system are you running?
description: Make sure to include the version.
placeholder: macOS Monterey 12.3.1
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
label: Steps to reproduce?
description: Provide as much detail as posible to reproduce the issue.
placeholder: |
1. Install dependencies: vX.Y.Z, etc...
2. Run the app
3. Click on the notification prompt
4. Note that this causes a runtime error and a failed subscription.
render: Markdown
validations:
required: true
- type: textarea
id: what-are-expectations
attributes:
label: What did you expect to happen?
description: Also tell us, what did you expect to happen?
placeholder: I expected the notification prompt to cause a native permission change in the browser.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: Shell
18 changes: 18 additions & 0 deletions outputs/onesignal-ngx/.github/ISSUE_TEMPLATE/general-feedback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 📣 General feedback
description: Tell us what's on your mind
title: '[Feedback]: '
labels: ['Feedback']

body:
- type: markdown
attributes:
value: |
Thanks for sharing your valuable feedback!
- type: textarea
id: feedback
attributes:
label: What's on your mind?
description: Feedback regarding this SDK.
placeholder: Share your feedback...
validations:
required: true
47 changes: 47 additions & 0 deletions outputs/onesignal-ngx/.github/workflows/asana-add-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Github --> Asana Add Comment Workflow

on:
issue_comment:
types: [created]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
issues: read
steps:
- name: Get Asana Task Corresponding to Issue
env:
ISSUE_ID: ${{ github.event.issue.id }}
REPO_FULL_NAME: ${{ github.event.repository.full_name }}
WORKSPACE_ID: "780103692902078"
run: |
REPO_SCOPED_ISSUE_ID="$REPO_FULL_NAME#$ISSUE_ID"

curl --request GET \
--url "https://app.asana.com/api/1.0/workspaces/$WORKSPACE_ID/tasks/search?opt_fields=notes&text=$REPO_SCOPED_ISSUE_ID&sort_by=modified_at&sort_ascending=false" \
--header 'accept: application/json' \
--header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \
--output response.json
TASK_GID=$(jq -r '.data[0].gid' response.json)
echo "TASK_GID=$TASK_GID" >> $GITHUB_ENV
- name: Comment on Asana Task
env:
ISSUE_COMMENT: ${{ github.event.comment.body }}
COMMENTER_NAME: ${{ github.event.comment.user.login }}
run: |
BODY_DATA=$(jq -n \
--arg text "$ISSUE_COMMENT" \
--arg commenter_name "$COMMENTER_NAME" \
'{
"data": {
"text": "\($commenter_name) left a comment:\n\n\($text)",
}
}')
curl --request POST \
--url https://app.asana.com/api/1.0/tasks/$TASK_GID/stories \
--header 'accept: application/json' \
--header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \
--header 'content-type: application/json' \
--data "$BODY_DATA"
119 changes: 119 additions & 0 deletions outputs/onesignal-ngx/.github/workflows/asana-create-task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Github --> Asana Create Task Workflow

on:
issues:
types: [opened]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
issues: read
steps:
- name: Create Asana task
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
ISSUE_HTML_URL: ${{ github.event.issue.html_url }}
ISSUE_ID: ${{ github.event.issue.id }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
REPO_FULL_NAME: ${{ github.event.repository.full_name }}
SDK_PLATFORM_GROUP: "1208961704779581"
SDK_PLATFORM_GROUP_WEB: "1208961704779583"
SDK_PLATFORM: "1208961704779592"
SDK_PLATFORM_ANGULAR: "1208961704779601"
DSA_PRIORITY: "1208779519954980"
DSA_PRIORITY_NO_PRIORITY: "1208779521616959"
DSA_STATUS: "1210103546117753"
DSA_STATUS_TRIAGE: "1210103546117756"
DSA_REPO_TICKET_URL: "1210347857768758"
WORKSPACE_ID: "780103692902078"
PROJECT_ID_GITHUB_AND_IMPORTANT_SDK_ISSUES: "1208970714650308"
PROJECT_ID_SDK_BACKLOG: "1208777198342772"
run: |
DATA_BODY=$(jq -n \
--arg title "$ISSUE_TITLE" \
--arg body "$ISSUE_BODY" \
--arg url "$ISSUE_HTML_URL" \
--arg id "$ISSUE_ID" \
--arg number "$ISSUE_NUMBER" \
--arg repo_full_name "$REPO_FULL_NAME" \
--arg sdk_platform_group "$SDK_PLATFORM_GROUP" \
--arg sdk_platform_group_web "$SDK_PLATFORM_GROUP_WEB" \
--arg sdk_platform "$SDK_PLATFORM" \
--arg sdk_platform_web "$SDK_PLATFORM_ANGULAR" \
--arg dsa_priority "$DSA_PRIORITY" \
--arg dsa_priority_no_priority "$DSA_PRIORITY_NO_PRIORITY" \
--arg dsa_status "$DSA_STATUS" \
--arg dsa_status_triage "$DSA_STATUS_TRIAGE" \
--arg dsa_repo_ticket_url "$DSA_REPO_TICKET_URL" \
--arg workspace_id "$WORKSPACE_ID" \
--arg project_id_github_and_important_sdk_issues "$PROJECT_ID_GITHUB_AND_IMPORTANT_SDK_ISSUES" \
--arg project_id_sdk_backlog "$PROJECT_ID_SDK_BACKLOG" \
'{
"data": {
"custom_fields": {
$sdk_platform_group: $sdk_platform_group_web,
$sdk_platform: $sdk_platform_angular,
$dsa_priority: $dsa_priority_no_priority,
$dsa_status: $dsa_status_triage,
$dsa_repo_ticket_url: $url
},
"name": $title,
"workspace": $workspace_id,
"projects": [$project_id_github_and_important_sdk_issues, $project_id_sdk_backlog],
"notes": "Issue ID: \($repo_full_name)#\($id)\nIssue number: \($number)\nCreated via GitHub Actions\n----\n\n\($body)"
}
}')

curl --request POST \
--url https://app.asana.com/api/1.0/tasks?opt_pretty=true \
--header 'accept: application/json' \
--header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \
--header 'content-type: application/json' \
--data "$DATA_BODY" \
--output response.json

TASK_GID=$(jq -r '.data.gid' response.json)
echo "TASK_GID=$TASK_GID" >> $GITHUB_ENV
- name: Move to "0 Unclassified" section in "Github & Important SDK Issues" project
env:
SECTION_ID_GITHUB_AND_IMPORTANT_SDK_ISSUES: "1208970755434051"
run: |
DATA_BODY=$(jq -n \
--arg task_gid "$TASK_GID" \
--arg section_id "$SECTION_ID_GITHUB_AND_IMPORTANT_SDK_ISSUES" \
'{
"data": {
"task": $task_gid,
"insert_after": "null"
}
}')

curl --request POST \
--url https://app.asana.com/api/1.0/sections/$section_id/addTask \
--header 'accept: application/json' \
--header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \
--header 'content-type: application/json' \
--data "$DATA_BODY"
- name: Move to "Untriaged" section in "SDK / Backlog" project
env:
SECTION_ID_SDK_BACKLOG: "1208899729378982"
run: |
DATA_BODY=$(jq -n \
--arg task_gid "$TASK_GID" \
--arg section_id "$SECTION_ID_SDK_BACKLOG" \
'{
"data": {
"task": $task_gid,
"insert_after": "null"
}
}')

curl --request POST \
--url https://app.asana.com/api/1.0/sections/$section_id/addTask \
--header 'accept: application/json' \
--header 'authorization: Bearer ${{ secrets.ASANA_PAT }}' \
--header 'content-type: application/json' \
--data "$DATA_BODY"
Loading