Code App PR Description
Paste it into GitHub Copilot Chat on a Power Apps code app branch and it reads the diff and writes the pull request description in the same shape every time: screens touched, data sources added, connector permissions changed, licensing impact and test evidence, each row tied to a file.
Overview
Summary
A team working on a Power Apps code app opens pull requests every day, and reviewers ask the same five questions of each one: which screens changed, which data sources came in, what users will now be asked to consent to, whether anyone needs a different licence, and what was tested. This prompt answers them from the diff. Paste it into GitHub Copilot Chat on the branch, fill in the base branch and what you tested, and Copilot writes the pull request description in the same shape every time:
- Screens touched: routes added, changed, removed or renamed, and screens reached through a shared component or an app-wide setting, plus changes to the app's solution or the pipeline's service principal sign-in;
- Data sources added: connectors, tables, Dataverse tables, actions and functions, flows and Copilot Studio agents added, removed, refreshed or rebound, and how each is bound (connection reference, connection ID, native,
@envvar:); - Connector permissions changed: the operations the app now calls or no longer calls, read or write, with what that means for consent, each user's access, the data policy, and anything the default Content Security Policy (CSP) blocks or the public build exposes;
- Licensing impact: No change, Possible change or Change, with the reason and what to confirm;
- Test evidence: tests in the diff and what they assert, your manual testing, the gaps, and up to five checks before merging.
Every row names its file. Anything the diff can't show is marked "To confirm" or listed under the description as not checked. It only reads: it doesn't change files, run the tests or push.
What's in the folder
| File | What it's for | Where it goes |
|---|---|---|
PROMPT.md |
The prompt: what a code app diff contains, the order to read it in, the description template and the rules. 7,998 of the 8,000 characters allowed. | Pasted into chat, as is, with the two placeholders filled in |
assets/preview.png |
The gallery image: what you fill in, the diff it reads, and a sample description with all five sections | For people only |
Run it
GitHub Copilot Chat in VS Code
- Check out the branch. In the Chat view, start a Local session with the Agent control on Agent, so Copilot can run
gitand open the generated service files. - Paste the contents of
PROMPT.md, fill in the two placeholders, and send it. - When Copilot asks to run a terminal command, allow only read-only ones:
git diff,git log,git status,git showand listing files. - Copy the fenced block into the pull request description. Read the list under the block of what it couldn't check.
To run it again with /code-app-pr-description, save it as .github/prompts/code-app-pr-description.prompt.md with this header above the prompt. Prompt files run only in Local harness sessions; in any other session, paste the prompt. Leave the placeholders in the saved file and fill them in each time: the prompt asks for them if you don't.
---
description: Write the pull request description for this code app branch: screens, data sources, connector permissions, licensing, test evidence.
agent: agent
---
GitHub Copilot CLI or another coding agent
Start the agent in the repository's root on the branch and paste the prompt. It works the same way in any agent that can run git.
A chat that can't see the repository
Paste the prompt and the output of git diff --stat <base>...HEAD, git diff <base>...HEAD, git log <base>..HEAD and git status --short, and attach power.config.json. Without the generated service files it can't map every method to its operation, and says so.
Placeholders
<base branch, such as main>: the branch the pull request merges into. If it isn't checked out locally, the prompt usesorigin/<base>.<what you ran and what you saw…>: your manual testing in a sentence or two. Say whether you ran it locally or pushed it to an environment, whether you signed in as the maker or as a user without maker rights, and which screens you opened. Write "nothing yet" if you haven't tested; the description then says "Not stated" and lists every gap.
What it checks
The facts the prompt relies on are stated in the prompt, so the agent doesn't need current documentation. Each rests on these pages:
| Section | What it reports | Basis |
|---|---|---|
| Screens touched | Routes and page components; shared components traced to the screens that render them; app-wide settings | Code apps "support single-page applications (SPAs)" (Architecture), so screens are routes, not a platform concept. pa app set-setting "writes the setting to appSettings in power.config.json", and the header setting applies "for all app users" (CLI reference; System configuration) |
| Screens touched: app-wide solution and sign-in | A changed --solution-id or PA_CLI_SOLUTION_ID; a pipeline that publishes as a service principal |
pa app push --solution-id adds the app to that solution; "If you omit this option, the CLI selects a solution automatically" on the first publish, while on later ones "The CLI doesn't change the app's existing solution membership", and "In environments without Dataverse, the app publishes without a solution" (ALM). A pipeline sets PA_CLI_USE_SP_AUTH, and "the service principal needs access to the target Power Platform environment and edit access to the code app" (Publish with a service principal). The prompt never copies the client secret |
| Data sources added | Entries in power.config.json and the generated files for each data source |
power.config.json "contains metadata… for Power Platform connections and to publish an app" (Architecture). Its keys come from the PowerConfig type in Microsoft's Dataverse sample. Adding a data source "automatically generates a typed TypeScript model and service file"; pa app remove data-source and pa app refresh data-source (Connect to data). A flow "Adds the flow and its connection references to power.config.json" and writes schemas/logicflows/ (Add flows). A Dataverse action or function writes <schemaPath>/dataverse/, regenerates dataSourcesInfo.ts and "Adds the Dataverse reference" to power.config.json (Add a Dataverse action or function). Action services carry "This file is autogenerated" and name each operationName; table services expose create, get, getAll, update and delete (Microsoft's Release Planner sample; Connect to Dataverse) |
| Data sources added: binding | Connection reference, connection ID, native, @envvar: |
A connection reference "makes the solution environment-aware and portable across Dev, Test, and Prod environments"; "Native Dataverse doesn't use a connection ID, connection reference, or dataset" (Connect to data; CLI reference). @envvar: references for "tabular arguments such as dataset and table" are "persisted in the data source configuration" (Use environment variables) |
| Data sources added: flags | Client library below 1.1.1; Excel Online | Flows need "@microsoft/power-apps version 1.1.1 or later" and must be "solution-aware instant flows that use the Power Apps trigger" (Add flows); so do Dataverse actions and functions (Add a Dataverse action or function). Excel Online (Business) and Excel Online (OneDrive) "aren't yet supported" (Connect to data). The prompt reads the installed version from the lockfile, not the range in package.json |
| Connector permissions changed: read or write | Each operation classed Read or Write | Dataverse functions "perform operations that have no side effects" (Use Web API functions); actions can change data. Connector operations are classed by name, then by the generated service's comment |
| Connector permissions changed: consent | Whether users may see the consent dialog again | "End-users see consent dialog for connector permissions", and "Consent suppression works for both Microsoft connectors that use OAuth and custom connectors that use OAuth" (Overview). For canvas apps, "the consent dialog lists the specific permissions that the app uses", is "presented to the user again for the aggregated permissions" when actions are added, and "The permissions continue with the maximum set of actions that have ever been used" (Manage connections in canvas apps). The prompt says this is documented for canvas apps only |
| Connector permissions changed: access | What each user needs for each new source | "Code apps don't yet support Secure Implicit Connections" (Overview); flow callers need "the App Opener security role or an equivalent role" (Add flows) |
| Connector permissions changed: data policy | Each new connector the policy must allow | "Data Loss policy enforcement during app launch" (Overview); a violating app is put "in to a suspended or quarantine state", and "the latency for full enforcement is 24 hours" at most (Data policies) |
| Connector permissions changed: outside connectors | fetch, axios, sockets, CDN resources, cross-origin iframes, keys in client code |
Default connect-src 'none', script-src 'self', font-src 'self', frame-src 'self'; settings apply "to all code apps in the environment" and need an environment administrator (Configure CSP). Built files are hosted "on a publicly accessible endpoint… Don't store sensitive user or organizational data in the app" (System configuration) |
| Licensing impact: audience | New users, guests, edit grants | pa app share grants play (default) or edit; "Grant edit access when a service principal needs to run pa app push" (CLI reference). "Code apps follow canvas app sharing limits", and guests can use them through Azure B2B (Overview; Microsoft now calls this Microsoft Entra B2B collaboration, per What is Microsoft Entra B2B collaboration?) |
| Licensing impact: licences and cost | No change, Possible change or Change | End users need "Power Apps Premium license", "Pay-as-you-go enabled", "An App Pass" or "Auto-claim enabled" (Overview). For an instant flow in the context of an app, "every user running the flow needs a Power Apps Premium license or a Dynamics 365 license" (Power Apps licensing FAQs). "Copilot Credits are the unit that measures agent usage"; the no-charge row for Microsoft 365 Copilot licensed users covers employee-facing use where "the agent operates using the authenticated Microsoft Copilot USL user's identity" (Copilot Studio billing rates). The connector is shared_microsoftcopilotstudio (Connect to Copilot Studio) |
| Test evidence | Tests and what they assert, your notes, gaps, checks before merge | No Microsoft claim. The prompt forbids saying tests pass unless the diff or your notes show the result, doesn't count a test that asserts nothing about the app, and treats a local run as weaker evidence than a pushed app |
How it sets the licensing verdict: Change when the branch adds an audience (a pa app share or guest access) or a Copilot Studio agent call; Possible change when it adds a flow (for users on an App Pass or pay-as-you-go) or a custom connector to a service that bills separately; otherwise No change, because every user already needs one of the four licence options and the code apps pages name no connector that needs more.
The Code App Readiness Check covers the step before this one: whether an existing app can become a code app at all.
Prerequisites
- A Power Apps code app in a git repository, with the branch checked out and the base branch available locally or as
origin/<base>. - GitHub Copilot Chat in VS Code with the Agent control on Agent, the GitHub Copilot CLI, or another coding agent that can run read-only
gitcommands. - Nothing on Power Platform is needed to write the description. To act on it, someone with access to the environment checks the data policy, CSP settings, sharing limits and licences it names.
Limitations
- Written against 22 Microsoft Learn pages dated 27 August 2025 to 30 October 2026, read on 1 and 5 November 2026, and against Microsoft's PowerAppsCodeApps repository as re-checked on 5 November 2026. Code apps change often; check the Sources before relying on a section.
- The keys inside
power.config.jsonaren't documented on Learn as of 1 November 2026. The prompt names the keys typed in Microsoft's Dataverse sample, which can change without notice. - Generated file locations differ between Microsoft's own pages and samples (
src/generated/services/,src/services/,.power/schemas/,schemas/logicflows/,<schemaPath>/dataverse/). The prompt recognises generated files by their "This file is autogenerated" header rather than by folder. - Repositories set up before the Power Apps CLI (
pa) may still runpac codecommands in scripts and pipelines. The prompt reads them as theirpa appequivalents. Learn'spac codereference (25 October 2026) marks the commands as preview, says to "use the npm-based Power Apps CLI instead", and says the new CLI "will replace these commands, which will be deprecated in a future release"; it doesn't map each command to itspa appequivalent. - Whether the consent dialog in a code app follows the canvas app rule (shown again when operations are added, never reduced) isn't documented for code apps as of 1 November 2026. The prompt says users "may" see it again.
- Two licensing questions aren't documented as of 1 November 2026: whether a Copilot Studio agent call from a code app counts as included use for Microsoft 365 Copilot licensed users, and whether an App Pass or pay-as-you-go covers an instant flow run from a code app (the licensing FAQ names Power Apps Premium and Dynamics 365 only). The prompt reports both as things to confirm, not as costs. The same FAQ says stricter licence checks start in February 2027; code apps already require a premium licence for every user.
- Whether running the app locally applies the environment's CSP isn't documented as of 1 November 2026, so the prompt doesn't treat a local run as proof that the pushed app works. Local runs can also hit the browser's local network access prompt (Quickstart).
- Read or write is decided from the operation's name, its Dataverse type and the generated service's comment. An operation with an unclear name may be classed wrongly, and a Copilot Studio agent can take actions of its own; the table is a starting point for the reviewer, not a permission audit.
- Sovereign clouds aren't covered. The Power Apps CLI targets
publicby default and acceptsusgov,usgovhigh,usgovdodandchinathrough--cloudorPA_CLI_CLOUD(CLI environment variables); the prompt doesn't read either, and the code apps pages cited here don't describe how code apps differ in those clouds as of 5 November 2026. - The prompt can't see the environment: the data policy, CSP settings, sharing limits, who holds which licence, or whether a connection reference or environment variable exists in the target solution. It names what to confirm instead.
- Tried three times on one sample branch, run by a coding agent that could run
git. The first version was given a React code app with 16 planted changes and reported all 16. After review the branch grew to 28: added@envvar:bindings, a Dataverse table, function and bound action on a lockfile pinned to 1.0.3, a pipeline withpac code pushand an edit grant to a service principal, a new screen, and an uncommitted change. The prompt as published reported all 28, classed the Dataverse function as a read, and copied none of the connection, environment or app IDs, the site or org URLs, the email or the key value. Table cells still ran longer than asked. Not yet run inside GitHub Copilot Chat itself.
Sources
Microsoft Learn, with each page's ms.date, first read on 1 November 2026 and re-checked on 5 November 2026:
- Power Apps code apps overview, 23 Sep 2026
- Code apps architecture, 12 Aug 2026
- Code apps system configuration, 15 Sep 2026
- Quickstart: Create a code app using the Power Apps CLI, 13 Aug 2026
- Connect your code app to data, 2 Oct 2026
- Connect your code app to Dataverse, 14 Aug 2026
- Add a Dataverse action or function to a code app, 13 Aug 2026
- Use environment variables in code app data sources, 13 Aug 2026
- Add Power Automate flows to a code app, 13 Aug 2026
- Connect to Copilot Studio, 13 Aug 2026
- Configure Content Security Policy, 7 Apr 2026
- Power Apps CLI command reference, 2 Oct 2026
- Application lifecycle management (ALM) for code apps, 27 Aug 2026, read on 5 November 2026
- Publish Power Apps code apps with a service principal, 26 Aug 2026, read on 5 November 2026
- pac code (Power Platform CLI reference), 25 Oct 2026, read on 5 November 2026
- Use Microsoft Dataverse Web API functions, 11 Jun 2026
- Manage connections in canvas apps, 27 Aug 2025
- Data policies, 14 Oct 2026
- Power Apps CLI environment variables, 2 Oct 2026, read on 5 November 2026
- What is Microsoft Entra B2B collaboration?, 24 Apr 2026, read on 5 November 2026
- Power Apps licensing FAQs, 8 Oct 2026
- Copilot Studio billing rates and management, 30 Oct 2026
Other sources, read on 1 November 2026:
- microsoft/PowerAppsCodeApps, re-checked on 5 November 2026 (the repository last changed on 4 Nov 2026, removing only
.claude-pluginfiles;powerApps.tslast changed 2 Sep 2026 and the Release Planner service 28 May 2026): thePowerConfigtype insamples/Dataverse/plugins/powerApps.ts, and the generatedMicrosoftCopilotStudioService.tsinpowercat/release-planner/(autogenerated header,operationName,.power/schemas/import) - Use prompt files in VS Code, updated 4 Nov 2026, read on 5 November 2026
Contributors
Version history
| Version | Date | Comments |
|---|---|---|
| 1.0 | November 2026 | Initial release |
| 1.1 | November 2026 | Reports solution targeting and service principal publishing, and cites Learn's pac code deprecation note. Also recognises generated files under src/services/, notes that sovereign clouds aren't covered, and refreshes the data policy wording, links and source dates. |
Help
Prompts here are community samples without support. Search existing issues or open a new one. For Microsoft product questions use Microsoft Learn or your Microsoft support channel.
Disclaimer
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
Prompt
Paste into chat
7,998 of 8,000 characters. The prompt is self-contained: it states the facts its checks rely on, and the README cites them.
From prompts/code-app-pr-description/PROMPT.md, shown exactly as it is pasted.
Write the pull request description for this branch of a Power Apps code app. Read the diff; don't change files, run tests or anything that changes state.
Base branch: <base branch, such as main>
What I tested: <what you ran and what you saw: locally or pushed to an environment, as the maker or a user without maker rights, on which screens; or "nothing yet">
If either line above still shows angle brackets, ask me for it first. Read `git diff --stat <base>...HEAD`, `git diff <base>...HEAD`, `git log <base>..HEAD` and `git status --short` (use `origin/<base>` if there's no local branch). If you can't run git, ask me to paste them and `power.config.json`.
## What a code app diff contains
- A single-page app with no platform screens: a screen is a route, or the page component it renders.
- `power.config.json` holds the CLI's connection and publishing data: `appId`, `environmentId`, `buildPath`, `buildEntryPoint`, `connectionReferences`, `databaseReferences` and `appSettings`. `appSettings` (such as hiding the header) applies to every screen.
- `pa app add data-source`, `pa app add dataverse-api` and `pa app add flow` write schemas, a typed model and a service, and update `power.config.json`. `pa app remove data-source` and `pa app remove flow` undo it; `pa app refresh data-source` regenerates after a schema change. Older scripts may use `pac code` commands. Generated files start with "This file is autogenerated" and sit under `src/generated/`, `src/services/`, `.power/schemas/` or `schemas/`. Action services name each `operationName`; table services expose `create`, `get`, `getAll`, `update`, `delete`.
- A data source is bound by a connection ID or a connection reference (a solution component that moves across Dev, Test and Prod). Native Dataverse uses neither. Dataset and table can be `@envvar:` references to solution environment variables.
- `pa app push --solution-id` (or `PA_CLI_SOLUTION_ID`) adds the app to a solution; without it, a first push picks one (none without Dataverse).
- Data calls run as each user, with no Secure Implicit Connections, so each user needs access to each source. Users see a consent dialog for connector permissions; admins can suppress it for OAuth connectors. For canvas apps the dialog lists the operations used, returns when more are used and never shrinks; code apps pages don't say how code apps record them.
- Flows: solution-aware instant flows with the Power Apps trigger only; users need the App Opener security role or equivalent. Flows and Dataverse actions and functions need `@microsoft/power-apps` 1.1.1 or later. Dataverse functions have no side effects; actions can. Excel Online connectors aren't supported.
- The environment's data policy is enforced at app launch; a violating app is suspended or quarantined, and policy changes take up to 24 hours.
- Content Security Policy (CSP) is enforced by default and only an environment admin can change it, for every code app there. Defaults include `connect-src 'none'`, `script-src 'self'`, `font-src 'self'`, `frame-src 'self'`, so calls or resources outside generated services are blocked. Built files are served from a public endpoint: keys in client code are exposed.
- Sharing: `pa app share` grants `play` or `edit`; edit lets a principal, such as a pipeline's service principal (`PA_CLI_USE_SP_AUTH`), push new versions. Code apps follow canvas app sharing limits. Guests can use them through Microsoft Entra B2B collaboration.
- Licensing: every user needs Power Apps Premium, pay-as-you-go, an App Pass or auto-claim; the code apps pages name no connector that needs more. Each user running an app's instant flow needs Power Apps Premium or a Dynamics 365 licence. Copilot Studio agent usage is measured in Copilot Credits; some employee-facing use by Microsoft 365 Copilot licensed users is included, and whether a code app call qualifies isn't documented.
## Read the diff in this order
1. Group changed files: router and pages, components, app code, `power.config.json`, generated files, tests and CI, `package.json` and lockfile, scripts and pipelines. Note uncommitted changes as not included.
2. **Screens.** Routes added, removed or moved; page components changed; screens that render a changed shared component.
3. **Data sources.** `power.config.json` entries added, removed or rebound; generated files added, removed or regenerated.
4. **Operations.** Generated service methods newly called, or no longer called, outside generated code. Open each service to find its connector and operation. Write: create, update, delete, send, post, a flow run or a Dataverse action. Read: get, list, search or a Dataverse function. Otherwise read the service's comment.
5. **Outside connectors.** `fetch`, `axios`, `XMLHttpRequest`, WebSocket, CDN scripts, fonts or styles, cross-origin iframes, keys in client code.
6. **Audience and cost.** `pa app share` (note edit grants), guests, the Copilot Studio connector (`shared_microsoftcopilotstudio`), flows, custom connectors to separately billed services.
7. **Tests.** Test files and what they assert; CI changes; the installed `@microsoft/power-apps` version from the lockfile.
## The description
Return the body in one fenced `markdown` block, in exactly this shape; fill each `{…}`. Keep every heading; write "None" under one with nothing to report. After the block, list in plain text what you couldn't check.
```markdown
## Summary
{Under 50 words: what changed and why.}
## Screens touched
| Screen (route) | Change | Files |
|---|---|---|
{Added, Changed, Removed, Renamed (old → new) or Shared (through {component}).}
App-wide: {appSettings, layout or routing changes reaching every screen; solution or pipeline sign-in; or None}
## Data sources added
| Data source | Kind | Connector | Table, dataset or operation | Bound by | Change |
|---|---|---|---|---|---|
{Kind: connector actions, connector table, SQL procedure, Dataverse table, Dataverse action, Dataverse function, flow, Copilot Studio agent. Bound by: connection reference {logical name}, connection ID, or native; add "@envvar" where used. Change: Added, Removed, Refreshed or Rebound.}
## Connector permissions changed
| Connector | Now called | No longer called | Read or write |
|---|---|---|---|
- Consent: {whether users may see the consent dialog again}
- Access each user needs: {per new source}
- Data policy: {new connectors the policy must allow alongside the others}
- Outside connectors: {what default CSP blocks or exposes, with file and line, or None}
## Licensing impact
**{No change | Possible change | Change}**: {one sentence}
- {each reason, and what to confirm with whoever owns licensing}
## Test evidence
- Automated: {tests and what they assert, or None}
- Manual: {from "What I tested", or Not stated}
- Gaps: {new screens, data sources and write operations with no evidence}
- Before merge: {up to five checks}
```
## Rules
- Every row comes from the diff or my notes and names its file. Mark inferences "To confirm". One row per screen, source or connector; short cells naming one file each; one line per bullet.
- Never say tests pass unless my notes or the diff show it. A test that asserts nothing about the app isn't evidence. A local run doesn't prove the pushed app works.
- Licensing impact: Change for a new audience or a Copilot Studio agent; Possible change for a flow (users on an App Pass or pay-as-you-go) or a separately billed service; otherwise No change.
- Describe generated files by data source, not line by line. A generated file changed with no matching `power.config.json` change: "Generated file edited, or schema refreshed: ask the author".
- Under Data sources added, flag: a connection ID binding (a reference moves across environments); a flow, Dataverse action or Dataverse function on `@microsoft/power-apps` below 1.1.1; Excel Online.
- Never copy connection, environment or app IDs, tenant names, site URLs, user names, emails, keys or secret values. Give the file and line.
Files
The prompt you paste, plus any extras for people in assets/; metadata.json, README.md and the gallery preview image are for people and are not listed.
| Path | Size |
|---|---|
| PROMPT.md | 7.8 KB |