Skip to content

Conversation

fadi-george
Copy link
Contributor

@fadi-george fadi-george commented Sep 10, 2025

Description

1 Line Summary

  • automate creation of turbine pr
Screenshot 2025-09-10 at 4 08 41 PM

Details

  • adds script to the cd workflow to automate creating turbine pr:
    • clones turbine repo and creates/update the sdk release branch
    • creates the pr diff with the updated commit sha for user model field
    • sets eng sdk platform as reviewers

Systems Affected

  • WebSDK
  • Backend
  • Dashboard

Validation

Tests

Info

Checklist

  • All the automated tests pass or I explained why that is not possible
  • I have personally tested this on my machine or explained why that is not possible
  • I have included test coverage for these changes or explained why they are not needed

Programming Checklist
Interfaces:

  • Don't use default export
  • New interfaces are in model files

Functions:

  • Don't use default export
  • All function signatures have return types
  • Helpers should not access any data but rather be given the data to operate on.

Typescript:

  • No Typescript warnings
  • Avoid silencing null/undefined warnings with the exclamation point

Other:

  • Iteration: refrain from using elem of array syntax. Prefer forEach or use map
  • Avoid using global OneSignal accessor for context if possible. Instead, we can pass it to function/constructor so that we don't call OneSignal.context

Screenshots

Info

Checklist

  • I have included screenshots/recordings of the intended results or explained why they are not needed

Related Tickets



This change is Reviewable

@fadi-george fadi-george force-pushed the fadi/sdk-2937-automate-portion-of-web-cd-pipeline branch from 712a12f to 19cbabe Compare September 10, 2025 23:53
@@ -0,0 +1,68 @@
#!/bin/bash

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fadi-george couldn't we make this work in the GA? instead of having a standalone script?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script is kind of long, I didn't want it to be all in the github acitons

git config user.email "github-actions[bot]@users.noreply.github.com"

# Create new branch
BRANCH_NAME="web-sdk-${SDK_VERSION}-release"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, do we have a pre-defined pattern for creating release branches?
I used rel/x.x.x for Android, this will help in reusing other steps in a GA.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abdulraqeeb33 the branch is created on a different repo, turbine, we need to include web sdk in the branch name somewhere. Turbine does more than host the Web SDK.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was following this pattern, https://docs.google.com/document/d/1ekfGZHxYyu04Z5VcE_8vkTWJEQm2e8Ndp-hlFedFM-Q/edit?tab=t.0#heading=h.u6bz69tu00ad
but I suppose the branch could be that or rel/xxyyzz

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what we can really reuse since this one goes through turbine

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't use rel/x.x.x in the turbine repo, it serves much more than the Web SDK. So if we change it could be something like web-sdk-rel/xxyyzz

Copy link
Contributor Author

@fadi-george fadi-george Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or can keep it as is.

package.json Outdated
@@ -36,7 +36,7 @@
"lint": "eslint src --ext .js,.jsx,.ts,.tsx; prettylint 'src/**/*' 'test/**/*' '__test__/**/*' --no-editorconfig"
},
"config": {
"sdkVersion": "160508"
"sdkVersion": "160509"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am guessing you updated this manually for this PR. but for a release PR, it will automatically increment it right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for testing can remove change after approval. We don't have a good process for incrementing automatically.

@fadi-george fadi-george merged commit 1a6a864 into main Sep 11, 2025
3 checks passed
@fadi-george fadi-george deleted the fadi/sdk-2937-automate-portion-of-web-cd-pipeline branch September 11, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants