Skip to content

[action] Add update_app_age_rating action for standalone age rating updates#30025

Merged
iBotPeaches merged 5 commits into
fastlane:masterfrom
PratikPatil131:fix/app-age-rating-action
Jun 3, 2026
Merged

[action] Add update_app_age_rating action for standalone age rating updates#30025
iBotPeaches merged 5 commits into
fastlane:masterfrom
PratikPatil131:fix/app-age-rating-action

Conversation

@PratikPatil131

@PratikPatil131 PratikPatil131 commented May 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new update_app_age_rating action for standalone App Store Connect age rating updates.

This follows the discussion in #30017, where maintainer @iBotPeaches suggested introducing a dedicated action (similar to match_nuke) instead of extending the existing skip_metadata behavior.

Motivation

Age ratings are app-level metadata and can be updated independently from screenshots, descriptions, or binary uploads.

Currently, automating an age rating update through fastlane requires invoking the broader deliver metadata flow, even when only the age rating declaration needs to change.

This action provides a lightweight and explicit workflow for that use case.

Changes

  • Added update_app_age_rating action
  • Added RSpec coverage for success and failure paths

Implementation Details

The action:

  1. Authenticates using either:

    • App Store Connect API key
    • Apple ID session fallback
  2. Finds the app via bundle identifier

  3. Fetches editable AppInfo

  4. Parses the supplied JSON configuration

  5. Reuses existing AgeRatingDeclaration mapping helpers already used by deliver

  6. Updates the age rating declaration via Spaceship

No new Spaceship API surface was introduced.

Example

update_app_age_rating(
  api_key_path: "fastlane/api_key.json",
  app_identifier: "com.example.app",
  age_rating_config_path: "fastlane/metadata/age_rating.json"
)

Testing

bundle exec rspec fastlane/spec/update_app_age_rating_spec.rb

bundle exec rubocop fastlane/lib/fastlane/actions/update_app_age_rating.rb

bundle exec rubocop fastlane/spec/update_app_age_rating_spec.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
  • I see green ci/circleci builds passing
  • I've read the Contribution Guidelines
  • I've added/updated relevant unit tests
  • I've updated the CHANGELOG

@iBotPeaches iBotPeaches left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some initial comments! I'll admit this is the first new action to the codebase in a long time. I'll need to carefully review how others were added and consult some other maintainers.

I do believe this is the right path forward though - so do not get discouraged.

Comment thread fastlane/lib/fastlane/actions/update_app_age_rating.rb
Comment thread CHANGELOG.latest.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new fastlane action for updating App Store Connect age rating metadata independently of the broader deliver metadata upload flow.

Changes:

  • Introduces update_app_age_rating with API key / Apple ID authentication, app lookup, JSON parsing, and age rating update logic.
  • Adds RSpec coverage for authentication, success, failure paths, options, platform support, and metadata helpers.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
fastlane/lib/fastlane/actions/update_app_age_rating.rb Adds the new standalone age rating update action.
fastlane/spec/update_app_age_rating_spec.rb Adds tests for the new action behavior and configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread fastlane/lib/fastlane/actions/update_app_age_rating.rb
Comment thread fastlane/lib/fastlane/actions/update_app_age_rating.rb
@iBotPeaches

Copy link
Copy Markdown
Member

Added Copilot. The one comment that looks interesting is us not using the shared lane value for an existing appstore connect session.

https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/actions/match_nuke.rb#L8

@PratikPatil131

PratikPatil131 commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

Hello @iBotPeaches I'm sorry i missed the updates on PR. I'll update the changes today and let you know. Thanks for the review !

…context for api_key to match match_nuke pattern.

Call map_deprecation_if_possible in build_attributes for deprecated fields.
…tes, deprecated_keys, mapped_keys]. Now we unpack it with attributes, = to extract only the attributes hash, then return it.
@PratikPatil131

Copy link
Copy Markdown
Contributor Author

Hey @iBotPeaches any update on this?

@iBotPeaches iBotPeaches changed the title Add update_app_age_rating action for standalone age rating updates [action] Add update_app_age_rating action for standalone age rating updates Jun 3, 2026
@iBotPeaches iBotPeaches merged commit 3f73c21 into fastlane:master Jun 3, 2026
9 checks passed

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey @PratikPatil131 👋

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 month, 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 🚀"

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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.236.0 🚀

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.

3 participants