-
Notifications
You must be signed in to change notification settings - Fork 153
Add server-logic, cloud-flow, integrate-backend skills and plugin version check #57
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
Merged
Priyanshu Agrawal (priyanshu92)
merged 36 commits into
main
from
users/suyashpatel/server-logic-skill
Apr 9, 2026
Merged
Changes from 32 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
6e7e827
Add integrate-serverlogic skill for Power Pages Server Logic
8534ae7
Fix server logic file location and add YAML metadata support
710354d
Add table permissions phase for Dataverse connector access
b5b2045
Add web role creation and permissions source choice to server logic s…
76bc1d5
Merge branch 'main' of https://github.com/microsoft/power-platform-sk…
priyanshu92 19443f9
Update command references in SKILL.md
priyanshu92 fa73210
Align server logic skill workflow
priyanshu92 adc1db3
Update server logic skill workflow and bump plugin to v1.2.0
priyanshu92 24e209f
Address Copilot review feedback on server logic skill
priyanshu92 23395fe
Enhance server logic validation and documentation
priyanshu92 aa1d028
Merge remote-tracking branch 'origin/main' into users/suyashpatel/ser…
800bdb5
Rename integrate-serverlogic skill to add-server-logic
176dda0
Fix server-logic validator regex and YAML string quoting
09e3ae7
Add cloud flow skill with intent-based suggestion and re-integration …
cbf4369
Add document.title requirement for create-site page components
ae2d377
Fix serverlogic metadata test to expect single-quoted YAML values
8c7baa1
Prevent render-template from overwriting existing HTML plan files
186ef9b
Fix server-logic skill accuracy and add secrets management workflow
8dfe89a
Add integrate-backend meta skill, fix review findings, add missing tests
2fb0ae3
Fix CI timeout in create-environment-variable test
c6114ca
Fix CI timeout in store-keyvault-secret test and update Playwright MC…
4b1e64c
Add Key Concepts and Implementation Order tabs to backend plan, enabl…
3d97f8a
Fix PR review findings across server-logic, cloud-flow, and integrate…
5a3e680
Fix PR review findings: fileSlug validation and list-cloud-flows test…
d4cae01
Update docs links and improve integrate-backend decision framework
70bc94b
Add plugin version check script and tests
c509d1b
Add plugin version check to all SKILL.md files and update conventions
d167f47
Add CI workflow to enforce version check in SKILL.md files
f90e7cd
Add Azure Key Vault visualization to server logic HTML plan
28fb565
Address PR review comments on validator, plan template, and SKILL.md
e5c7afc
Avoid secret exposure in process listings and fix CI fork safety
9ae9ec2
Fix innerHTML XSS, unused SITE_NAME in script blocks, and cloudflow U…
908459f
Fix cloudflow validator: flowtriggerurl is always empty in Power Pages
261ef57
Add Dataverse custom action discovery and wrapping to server logic skill
541ca31
Address PR review comments: security, robustness, and correctness fixes
074bf92
Fix ER diagram coloring for Mermaid v11 SVG ID prefix change
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| name: validate-skill-version-check | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "plugins/power-pages/skills/**" | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| validate-skill-version-check: | ||
| name: validate-skill-version-check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: generate app token | ||
| if: ${{ github.event.pull_request.head.repo.fork == false }} | ||
| id: app-token | ||
| uses: actions/create-github-app-token@v1 | ||
| with: | ||
| app-id: 3189942 | ||
| private-key: ${{ secrets.POWER_PLATFORM_SKILLS_APP_PRIVATE_KEY }} | ||
|
|
||
| - name: checkout (non-fork) | ||
| if: ${{ github.event.pull_request.head.repo.fork == false }} | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.head_ref }} | ||
| token: ${{ steps.app-token.outputs.token }} | ||
|
|
||
| - name: checkout (fork) | ||
| if: ${{ github.event.pull_request.head.repo.fork == true }} | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: setup-node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
|
|
||
| - name: check-only (fork) | ||
| if: ${{ github.event.pull_request.head.repo.fork == true }} | ||
| run: node scripts/ensure-skill-version-check.js --check | ||
|
|
||
| - name: add missing version checks (non-fork) | ||
| if: ${{ github.event.pull_request.head.repo.fork == false }} | ||
| run: node scripts/ensure-skill-version-check.js | ||
|
|
||
| - name: commit and push if changed (non-fork) | ||
| if: ${{ github.event.pull_request.head.repo.fork == false }} | ||
| run: | | ||
| git diff --quiet && exit 0 | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add "plugins/power-pages/skills/*/SKILL.md" | ||
| git commit -m "Auto-add plugin version check to SKILL.md files" | ||
| git push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| /** | ||
| * Plugin version check. Compares local plugin.json version against | ||
| * origin/main and prints an update notice if remote is newer. | ||
| * Exits silently if versions match or on any error. | ||
| * | ||
| * Usage: node check-version.js | ||
| * Functions are also exported for testing. | ||
| */ | ||
|
|
||
| const { execSync } = require('child_process'); | ||
| const path = require('path'); | ||
| const fs = require('fs'); | ||
|
|
||
| /** | ||
| * Compare two semver strings (major.minor.patch). | ||
| * Returns 1 if b > a (remote newer), -1 if a > b (local newer), 0 if equal. | ||
| */ | ||
| function compareSemver(a, b) { | ||
| const pa = a.split('.').map(Number); | ||
| const pb = b.split('.').map(Number); | ||
| for (let i = 0; i < 3; i++) { | ||
| if ((pb[i] || 0) > (pa[i] || 0)) return 1; | ||
| if ((pb[i] || 0) < (pa[i] || 0)) return -1; | ||
| } | ||
| return 0; | ||
| } | ||
|
|
||
| /** | ||
| * Format the update notification as plain text. | ||
| * Includes marketplace update (first) and plugin update (second). | ||
| */ | ||
| function formatUpdateMessage(pluginName, localVersion, remoteVersion, marketplaceName) { | ||
| const qualifiedName = marketplaceName ? `${pluginName}@${marketplaceName}` : pluginName; | ||
| let msg = `\nPlugin update available: ${pluginName} ${localVersion} → ${remoteVersion}.\n`; | ||
| if (marketplaceName) { | ||
| msg += `Run:\n claude plugin marketplace update ${marketplaceName}\n claude plugin update ${qualifiedName}`; | ||
| } else { | ||
| msg += `Run: claude plugin update ${qualifiedName}`; | ||
| } | ||
| return msg; | ||
| } | ||
|
|
||
| /** | ||
| * Read the marketplace name from .claude-plugin/marketplace.json at the git root. | ||
| * Returns null if not found. | ||
| */ | ||
| function readMarketplaceName(gitRoot) { | ||
| try { | ||
| const marketplacePath = path.join(gitRoot, '.claude-plugin', 'marketplace.json'); | ||
| const marketplace = JSON.parse(fs.readFileSync(marketplacePath, 'utf8')); | ||
| return marketplace.name || null; | ||
| } catch { | ||
| return null; | ||
| } | ||
| } | ||
|
|
||
| module.exports = { compareSemver, formatUpdateMessage, readMarketplaceName }; | ||
|
|
||
| if (require.main === module) { | ||
| try { | ||
| const pluginRoot = path.resolve(__dirname, '..'); | ||
| const pluginJsonPath = path.join(pluginRoot, '.claude-plugin', 'plugin.json'); | ||
|
|
||
| const localPlugin = JSON.parse(fs.readFileSync(pluginJsonPath, 'utf8')); | ||
| const localVersion = localPlugin.version; | ||
| if (!localVersion) process.exit(0); | ||
|
|
||
| const gitRoot = execSync('git rev-parse --show-toplevel', { | ||
| encoding: 'utf8', | ||
| timeout: 5000, | ||
| stdio: ['pipe', 'pipe', 'pipe'], | ||
| }).trim(); | ||
|
|
||
| const relPath = path.relative(gitRoot, pluginJsonPath).replace(/\\/g, '/'); | ||
|
|
||
| // Best-effort fetch | ||
| try { | ||
| execSync('git fetch origin main --quiet', { | ||
| encoding: 'utf8', | ||
| timeout: 10000, | ||
| stdio: ['pipe', 'pipe', 'pipe'], | ||
| }); | ||
| } catch { | ||
| // Use cached origin/main | ||
| } | ||
|
|
||
| const remoteContent = execSync(`git show origin/main:${relPath}`, { | ||
| encoding: 'utf8', | ||
| timeout: 5000, | ||
| stdio: ['pipe', 'pipe', 'pipe'], | ||
| }); | ||
| const remotePlugin = JSON.parse(remoteContent); | ||
| const remoteVersion = remotePlugin.version; | ||
| if (!remoteVersion) process.exit(0); | ||
|
|
||
| if (compareSemver(localVersion, remoteVersion) > 0) { | ||
| const pluginName = localPlugin.name || 'power-pages'; | ||
| const marketplaceName = readMarketplaceName(gitRoot); | ||
| console.log(formatUpdateMessage(pluginName, localVersion, remoteVersion, marketplaceName)); | ||
| } | ||
| } catch { | ||
| // Silent on error — don't block skill execution | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.