Skip to content

feat: auto-generate README dependency lists from Wizard API#115

Merged
da2gl merged 3 commits into
mainfrom
feat/auto-generate-readme-deps
Jun 8, 2026
Merged

feat: auto-generate README dependency lists from Wizard API#115
da2gl merged 3 commits into
mainfrom
feat/auto-generate-readme-deps

Conversation

@da2gl

@da2gl da2gl commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Ports the README dependency auto-sync feature from react-native-appodeal (PRs #165–#168) to the Flutter plugin.

What

  • scripts/update-readme-deps.mjs — fetches recommended mediations/sdks from the Appodeal Dependencies Wizard API and renders the iOS/Android dependency blocks, replacing the content between HTML-comment markers in README.md.
    • SDK version source: pubspec.yaml (RN used package.json).
    • iOS: Wizard output kept verbatim; flutter_install_all_ios_pods injected into the Podfile target (RN injects RN autolinking instead).
    • Android: keeps only the dependencies { } block — the duplicated repositories { } block is dropped (same as RN fix #168), since repos are documented separately.
  • .github/workflows/update-readme-deps.yml — runs on pubspec.yaml/script push to main, daily at 06:00 UTC, and manual dispatch. Bot opens a PR, a GitHub App approves + squash-merges it.
  • README.mdappodeal-deps:ios/android markers added around the dependency fenced blocks.

⚠️ Required repo setup before the workflow works

  1. Variable APPODEAL_API_URL = https://neo-mw-backend.appodeal.com (Settings → Secrets and variables → Actions → Variables).
  2. Secrets APP_ID + APP_PRIVATE_KEY (the same GitHub App used in react-native-appodeal).
  3. Branch protection on main (require PR + review) — so the App-approve+merge flow is meaningful.

🤖 Generated with Claude Code

Add a script and scheduled workflow that keep the iOS/Android dependency
blocks in README.md in sync with the live Appodeal Dependencies Wizard API.

- scripts/update-readme-deps.mjs: fetches recommended mediations/sdks and the
  rendered dependency text, then replaces the blocks between HTML-comment
  markers. SDK version comes from pubspec.yaml. Android keeps only the
  `dependencies { }` block; iOS gets the Flutter linking injected into the
  Podfile target.
- .github/workflows/update-readme-deps.yml: runs on pubspec/script push to
  main, daily at 06:00 UTC, and manual dispatch. Opens a PR as
  github-actions[bot] and approves+squash-merges it via a GitHub App.
- README.md: add appodeal-deps:ios/android markers around the dependency
  fenced blocks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

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 automated synchronization of the iOS/Android dependency snippets in README.md by fetching “recommended” dependency output from the Appodeal Dependencies Wizard API, and wires it into a scheduled + on-push GitHub Action.

Changes:

  • Added scripts/update-readme-deps.mjs to fetch mediations/SDKs and rewrite README sections between appodeal-deps:* HTML markers.
  • Added .github/workflows/update-readme-deps.yml to run the script on schedule / relevant pushes and open + auto-approve + squash-merge a PR when README changes.
  • Updated README.md to include marker comments around the iOS/Android dependency fenced blocks.

Reviewed changes

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

File Description
scripts/update-readme-deps.mjs Implements the Wizard API fetch + README marker replacement logic and platform-specific rendering tweaks.
README.md Adds HTML comment markers to delimit the auto-generated dependency blocks.
.github/workflows/update-readme-deps.yml Automates running the script and creating/approving/merging PRs when dependency blocks change.

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

Comment thread scripts/update-readme-deps.mjs Outdated
Comment thread scripts/update-readme-deps.mjs
Comment thread scripts/update-readme-deps.mjs
Comment thread scripts/update-readme-deps.mjs 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

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

Comment thread scripts/update-readme-deps.mjs Outdated
Comment thread scripts/update-readme-deps.mjs Outdated
Comment thread scripts/update-readme-deps.mjs
Comment thread README.md
A pubspec version may carry a `+build` suffix (e.g. 4.1.0+4); the Wizard API
endpoints expect a plain SDK version, so drop everything after `+`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

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

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

Comment thread scripts/update-readme-deps.mjs Outdated
Comment thread scripts/update-readme-deps.mjs
Comment thread README.md
Address Copilot review feedback:
- Fetch Android dependencies from the Groovy endpoint so the generated
  snippet matches the `groovy` fence and the `build.gradle` filename in the
  README (previously fetched kts output under a groovy fence).
- Update the header/function comments to state that the iOS target also gets
  use_modular_headers! injected, not just the Flutter autolinking call.
- Rename fenced()'s parameter to `fence` to reflect that it takes the full
  opening fence, not just a language tag.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

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

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

Comment thread scripts/update-readme-deps.mjs
Comment thread README.md
@da2gl
da2gl merged commit e0848b2 into main Jun 8, 2026
1 check passed
@da2gl
da2gl deleted the feat/auto-generate-readme-deps branch June 8, 2026 12:24
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