Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[onesignal]Update onesignal.rb to include optional organization_id #17696

Merged
merged 5 commits into from Dec 4, 2020

Conversation

brandon-carpenter
Copy link
Contributor

@brandon-carpenter brandon-carpenter commented Nov 30, 2020

🔑 adds optional, organization_id, paramater to onesignal.rb

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

This change adds the Onesignal organization_id as an optional parameter. Presently, when new Onesignal applications are created, they are created without being assigned to an organization. This allows end users to specify an organization_id if desired. Apps created under an organization will delegate the Onesignal org-level-admins to that application. Org-level-admins are unable to view/modify apps not within the organization.

No issue has been created. Please let me know if you'd like an issue created for this PR.

Description

The additional parameter was added inline with the other parameters in onesignal.rb. Payload has been updated along with self.available_options, and self.example_code.

Both bundle exec rubocop -a and bundle exec rspec as referenced here were ran following the changes.

Testing Steps

bundle exec onesignal was ran with a Fastfile containing the necessary parameters including organization_id. This resulted in a new application being created within Onesignal under the provided organization_id. This allowed org-level-admins to view the newly created onesignal application. Additionally, the changes were ran on an app update successfully, and on an app without the organization_id provided. On the latter, the app was created without being assigned to an organization. The changes will also update an application that was created outside of an organization and will move it under the provided organization.

adds optional, organization_id, paramater to onesignal.rb
@google-cla
Copy link

google-cla bot commented Nov 30, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Nov 30, 2020
@brandon-carpenter
Copy link
Contributor Author

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Nov 30, 2020
@brandon-carpenter brandon-carpenter changed the title Update onesignal.rb [onesignal]Update onesignal.rb to include optional organization_id Nov 30, 2020
Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

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

This looks good! Just a few small requests 😊

fastlane/lib/fastlane/actions/onesignal.rb Outdated Show resolved Hide resolved
fastlane/lib/fastlane/actions/onesignal.rb Outdated Show resolved Hide resolved
fastlane/lib/fastlane/actions/onesignal.rb Outdated Show resolved Hide resolved
brandon-carpenter and others added 3 commits December 2, 2020 13:03
Co-authored-by: Josh Holtz <josh@rokkincat.com>
Co-authored-by: Josh Holtz <josh@rokkincat.com>
Co-authored-by: Josh Holtz <josh@rokkincat.com>
@brandon-carpenter
Copy link
Contributor Author

Updated with your suggestions. Thanks!

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you so much for the contribution ❤

@joshdholtz joshdholtz merged commit d87a2e3 into fastlane:master Dec 4, 2020
@fastlane-bot
Copy link

Hey @brandon-carpenter 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

Copy link

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

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

Congratulations! 🎉 This was released as part of fastlane 2.170.0 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants