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

[spaceship] Check if app removed from sale #21902

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

lucgrabowski
Copy link
Contributor

@lucgrabowski lucgrabowski commented Feb 29, 2024

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 see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.
  • I've added or updated relevant unit tests.

Motivation and Context

As described in #21890, Developer Removed from Sale state was removed from app store version and there was no way of checking if app is removed.

This PR should be considered after #21900 and #21901 are handled.

Description

This PR adds a removed_from_sale? helper method to App model to check if app is removed from sale.
As a first step it checks if app has a ready for distribution app store version.
Next it checks if app is unavailable in all the territories and if that is the case, it means that the app was removed from sale.

Testing Steps

Tested with spaceship playground with apps that are ready for distribution and removed from sale.

@fastlane-bot-helper
Copy link
Contributor

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

1 similar comment
@fastlane-bot-helper
Copy link
Contributor

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@lucgrabowski
Copy link
Contributor Author

Should we also check if availableInNewTerritories is false? What do you think?

@@ -66,6 +66,14 @@ def self.type
return "apps"
end

def removed_from_sale?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm wondering if it shouldn't be renamed to removed_from_sale_or_not_ready?

@lucgrabowski lucgrabowski marked this pull request as ready for review May 4, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants