Skip to content

Commit 92aba03

Browse files
committed
Create GitHub issue for CLI version updates
- 📝 Create a GitHub issue instead of a PR for CLI version updates. - 🔄 Generate issue content with current and latest CLI version details. - 📦 Assign the issue to GitHub Copilot for follow-up. -Priyanshu
1 parent 6432fba commit 92aba03

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

.github/workflows/update-pac-cli-version.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,26 @@ jobs:
4242
echo "update_needed=false" >> $GITHUB_OUTPUT
4343
fi
4444
45-
- name: Update gulpfile.mjs with new CLI version
45+
# Instead of updating the file and creating a PR, create a GitHub issue and assign it to Copilot if a new version is available
46+
- name: Create GitHub issue to update CLI version and assign to Copilot
4647
if: steps.compare_versions.outputs.update_needed == 'true'
47-
run: |
48-
sed -i "s/const cliVersion = '[0-9.]*'/const cliVersion = '${{ steps.get_latest_version.outputs.latest_version }}'/" gulpfile.mjs
49-
50-
- name: Create Pull Request to update CLI version
51-
if: steps.compare_versions.outputs.update_needed == 'true'
52-
uses: peter-evans/create-pull-request@v6
48+
uses: peter-evans/create-issue-from-file@v5
5349
with:
54-
commit-message: "chore: update PowerApps CLI version to ${{ steps.get_latest_version.outputs.latest_version }}"
55-
title: "chore: update PowerApps CLI version to ${{ steps.get_latest_version.outputs.latest_version }}"
56-
body: |
57-
This PR updates the PowerApps CLI version in `gulpfile.mjs` from ${{ steps.get_current_version.outputs.current_version }} to ${{ steps.get_latest_version.outputs.latest_version }}.
58-
59-
_Automated PR generated by GitHub Actions._
60-
branch: update/cli-version-${{ steps.get_latest_version.outputs.latest_version }}
61-
delete-branch: true
62-
add-paths: |
63-
gulpfile.mjs
50+
title: "Update PowerApps CLI version to ${{ steps.get_latest_version.outputs.latest_version }}"
51+
content-filepath: .github/cli-update-issue-template.md
52+
labels: "automation,dependencies"
53+
assignees: "github-copilot[bot]"
6454
env:
6555
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
57+
- name: Generate issue content file
58+
if: steps.compare_versions.outputs.update_needed == 'true'
59+
run: |
60+
echo "A new version of Microsoft.PowerApps.CLI is available on NuGet." > .github/cli-update-issue-template.md
61+
echo "" >> .github/cli-update-issue-template.md
62+
echo "Current version in gulpfile.mjs: ${{ steps.get_current_version.outputs.current_version }}" >> .github/cli-update-issue-template.md
63+
echo "Latest version on NuGet: ${{ steps.get_latest_version.outputs.latest_version }}" >> .github/cli-update-issue-template.md
64+
echo "" >> .github/cli-update-issue-template.md
65+
echo "Please update the CLI version in the repository." >> .github/cli-update-issue-template.md
66+
echo "" >> .github/cli-update-issue-template.md
67+
echo "For implementation reference, see PR #1236." >> .github/cli-update-issue-template.md

0 commit comments

Comments
 (0)