Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
1ffd109
fix: remove unused imports and improve error handling across multiple…
Kingshuk-Microsoft Feb 4, 2026
d4f8caa
Merge pull request #694 from microsoft/main
Avijit-Microsoft Feb 4, 2026
f711994
feat: Add main.waf.parameters.json with updated parameters and enable…
Pavan-Microsoft Feb 4, 2026
6273f66
Merge remote-tracking branch 'origin/main' into dev
Rafi-Microsoft Feb 5, 2026
caf4be8
updated deployment.md file with waf deployment steps.
Kanchan-Microsoft Feb 5, 2026
a0a1602
Added fix for bug #33406
Shubhangi-Microsoft Feb 6, 2026
0f6e367
add flake8 configuration and PyLint workflow for code quality checks
Pavan-Microsoft Feb 11, 2026
cb062a9
fix: Fixing of EXP Deployment - Bug#33406
Avijit-Microsoft Feb 11, 2026
bac0fff
Refactor services for improved readability and maintainability
Pavan-Microsoft Feb 11, 2026
17aae47
add workflow for checking broken links in Markdown files
Pavan-Microsoft Feb 11, 2026
97c7c6d
Add GitHub workflows for CodeQL analysis, stale issue management, tel…
Pavan-Microsoft Feb 11, 2026
bb0e8ce
fix: update test input values and error messages for clarity; refine …
Kingshuk-Microsoft Feb 11, 2026
2cf9646
Add documentation for Azure account setup and quota checks; include s…
Pavan-Microsoft Feb 11, 2026
15ef292
updated waf steps in azd_deployment.md file
Kanchan-Microsoft Feb 12, 2026
2d8c134
Enhance error handling in orchestrator.py with debug logging for JSON…
Pavan-Microsoft Feb 12, 2026
79ab147
Enhance compliance JSON parsing error handling with debug logging in …
Pavan-Microsoft Feb 12, 2026
e5d1420
Refactor quota_check_params.sh to simplify argument handling and remo…
Pavan-Microsoft Feb 12, 2026
6b74c1b
Update stale-bot.yml to improve PR branch listing by using closed sta…
Pavan-Microsoft Feb 12, 2026
73e39f3
Update pylint.yml to rename job step for clarity, focusing on flake8 …
Pavan-Microsoft Feb 12, 2026
b35a3e9
Fix shell script to correctly parse tab-separated subscription output…
Pavan-Microsoft Feb 12, 2026
82338d3
chore: New GitHub Actions workflows to automate code quality checks, …
Avijit-Microsoft Feb 12, 2026
11d415b
feat: Added main.waf.parameters.json with updated parameters and upda…
Avijit-Microsoft Feb 12, 2026
c947599
Updated the deployment readme
Ragini-Microsoft Feb 12, 2026
19b302f
added delete rg readme
Ragini-Microsoft Feb 12, 2026
deb3e4c
Added validation for rename button
Kanchan-Microsoft Feb 13, 2026
eaa9caf
fix: Added validation for rename button
Avijit-Microsoft Feb 13, 2026
2145ee2
Merge branch 'dev' of https://github.com/microsoft/content-generation…
Ragini-Microsoft Feb 13, 2026
2217d13
updated broken links and removed the not required readme
Ragini-Microsoft Feb 13, 2026
639d7c1
moved the quota check file to scripts folder
Ragini-Microsoft Feb 13, 2026
40249e1
Merge remote-tracking branch 'origin/main' into psl-pk-downmergedev
Pavan-Microsoft Feb 13, 2026
7ec3734
updated the default region for ai models
Ragini-Microsoft Feb 13, 2026
4078e79
Fix formatting issues in orchestrator.py by removing unnecessary blan…
Pavan-Microsoft Feb 13, 2026
679165b
Merge branch 'psl-pk-downmergedev' of https://github.com/microsoft/co…
Ragini-Microsoft Feb 13, 2026
03ed938
chore: Downmerge from main to dev
Avijit-Microsoft Feb 13, 2026
743369b
Merge branch 'dev' of https://github.com/microsoft/content-generation…
Ragini-Microsoft Feb 13, 2026
02cd8f1
feat: Update AI service location parameters and metadata for deployment
Pavan-Microsoft Feb 13, 2026
e5dcba5
readme update
Ragini-Microsoft Feb 13, 2026
a808dcc
Merge remote-tracking branch 'origin/dev' into psl-pk-ailocation
Pavan-Microsoft Feb 13, 2026
c82685a
docs: Updated readme, added sample prompts, updated broken links
Avijit-Microsoft Feb 13, 2026
43a60c1
feat: Update AI service location references in configuration files
Pavan-Microsoft Feb 13, 2026
00b4071
feat: Update AI deployment location parameter to required and remove …
Pavan-Microsoft Feb 13, 2026
78e5d92
fix: Update AI service location parameters and metadata for deployment
Avijit-Microsoft Feb 13, 2026
b2a63f9
Merge branch 'dev' into code-quality-fix
Kingshuk-Microsoft Feb 16, 2026
7b4ff40
fix: Remove unnecessary whitespace in orchestrator and cosmos_service…
Kingshuk-Microsoft Feb 16, 2026
9551afb
fix: Specify OSError in font loading exception handling
Kingshuk-Microsoft Feb 16, 2026
37dd5b0
fix: reverted "archive-doc-gen" changes
Kingshuk-Microsoft Feb 16, 2026
46179e5
Fix formatting and remove unnecessary newline
Avijit-Microsoft Feb 16, 2026
c944258
Fix test for renaming chat title with new error message
Avijit-Microsoft Feb 16, 2026
0b5741d
Clean up test_st_docgen_tc.py by removing unused code
Avijit-Microsoft Feb 16, 2026
c14a258
Fix logger handler removal in test case
Avijit-Microsoft Feb 16, 2026
f451a20
Fix logger handler removal in test case
Avijit-Microsoft Feb 16, 2026
559611c
Fix logger handler removal in test case
Avijit-Microsoft Feb 16, 2026
726e0b4
fix: remove unnecessary whitespace and logging in test cases
Kingshuk-Microsoft Feb 16, 2026
19f3a33
Merge branch 'code-quality-fix' of https://github.com/microsoft/conte…
Kingshuk-Microsoft Feb 16, 2026
c954697
fix: ensure logger handler removal in test case
Kingshuk-Microsoft Feb 16, 2026
afc881e
refactor: Code quality fix
Avijit-Microsoft Feb 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
max-line-length = 88
extend-ignore = E501
exclude = .venv, frontend
ignore = E203, W503, G004, G200
58 changes: 58 additions & 0 deletions .github/workflows/broken-links-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Broken Link Checker

on:
pull_request:
paths:
- '**/*.md'
workflow_dispatch:

permissions:
contents: read
actions: read

jobs:
markdown-link-check:
name: Check Markdown Broken Links
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v6
with:
fetch-depth: 0

# For PR : Get only changed markdown files
- name: Get changed markdown files (PR only)
id: changed-markdown-files
if: github.event_name == 'pull_request'
uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v46
with:
files: |
**/*.md


# For PR: Check broken links only in changed files
- name: Check Broken Links in Changed Markdown Files
id: lychee-check-pr
if: github.event_name == 'pull_request' && steps.changed-markdown-files.outputs.any_changed == 'true'
uses: lycheeverse/lychee-action@v2.7.0
with:
args: >
--verbose --no-progress --exclude ^https?://
${{ steps.changed-markdown-files.outputs.all_changed_files }}
failIfEmpty: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# For manual trigger: Check all markdown files in repo
- name: Check Broken Links in All Markdown Files in Entire Repo (Manual Trigger)
id: lychee-check-manual
if: github.event_name == 'workflow_dispatch'
uses: lycheeverse/lychee-action@v2.7.0
with:
args: >
--verbose --no-progress --exclude ^https?://
'**/*.md'
failIfEmpty: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44 changes: 44 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
paths:
- '**/*.py'
- '.github/workflows/codeql.yml'
pull_request:
branches: [ "main" ]
paths:
- '**/*.py'
- '.github/workflows/codeql.yml'
schedule:
- cron: '17 11 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
37 changes: 37 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PyLint

on:
push:
paths:
- 'content-gen/src/backend/**/*.py'
- 'content-gen/src/backend/requirements*.txt'
- '.flake8'
- '.github/workflows/pylint.yml'

permissions:
contents: read
actions: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r content-gen/src/backend/requirements.txt
pip install flake8 # Ensure flake8 is installed explicitly

- name: Run flake8
run: |
flake8 --config=.flake8 content-gen/src/backend # Specify the directory to lint
74 changes: 74 additions & 0 deletions .github/workflows/stale-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: "Manage Stale Issues, PRs & Unmerged Branches"
on:
schedule:
- cron: '30 1 * * *' # Runs daily at 1:30 AM UTC
workflow_dispatch: # Allows manual triggering
permissions:
contents: write
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Mark Stale Issues and PRs
uses: actions/stale@v10
with:
stale-issue-message: "This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or it will be closed in 30 days."
stale-pr-message: "This PR is stale because it has been open 180 days with no activity. Please update or it will be closed in 30 days."
days-before-stale: 180
days-before-close: 30
exempt-issue-labels: "keep"
exempt-pr-labels: "keep"
cleanup-branches:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch full history for accurate branch checks
- name: Fetch All Branches
run: git fetch --all --prune
- name: List Merged Branches With No Activity in Last 3 Months
run: |
echo "Branch Name,Last Commit Date,Committer,Committed In Branch,Action" > merged_branches_report.csv
for branch in $(git for-each-ref --format '%(refname:short) %(committerdate:unix)' refs/remotes/origin | awk -v date=$(date -d '3 months ago' +%s) '$2 < date {print $1}'); do
if [[ "$branch" != "origin/main" && "$branch" != "origin/dev" && "$branch" != "origin/demo" ]]; then
branch_name=${branch#origin/}
git fetch origin "$branch_name" || echo "Could not fetch branch: $branch_name"
last_commit_date=$(git log -1 --format=%ci "origin/$branch_name" || echo "Unknown")
committer_name=$(git log -1 --format=%cn "origin/$branch_name" || echo "Unknown")
committed_in_branch=$(git branch -r --contains "origin/$branch_name" | tr -d ' ' | paste -sd "," -)
echo "$branch_name,$last_commit_date,$committer_name,$committed_in_branch,Delete" >> merged_branches_report.csv
fi
done
- name: List PR Approved and Merged Branches Older Than 30 Days
run: |
for branch in $(gh api repos/${{ github.repository }}/pulls --state closed --paginate --jq '.[] | select(.merged_at != null and (.base.ref == "main" or .base.ref == "dev" or .base.ref == "demo")) | select(.merged_at | fromdateiso8601 < (now - 2592000)) | .head.ref'); do
git fetch origin "$branch" || echo "Could not fetch branch: $branch"
last_commit_date=$(git log -1 --format=%ci origin/$branch || echo "Unknown")
committer_name=$(git log -1 --format=%cn origin/$branch || echo "Unknown")
committed_in_branch=$(git branch -r --contains "origin/$branch" | tr -d ' ' | paste -sd "," -)
echo "$branch,$last_commit_date,$committer_name,$committed_in_branch,Delete" >> merged_branches_report.csv
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: List Open PR Branches With No Activity in Last 3 Months
run: |
for branch in $(gh api repos/${{ github.repository }}/pulls --state open --jq '.[] | select(.base.ref == "main" or .base.ref == "dev" or .base.ref == "demo") | .head.ref'); do
git fetch origin "$branch" || echo "Could not fetch branch: $branch"
last_commit_date=$(git log -1 --format=%ci origin/$branch || echo "Unknown")
committer_name=$(git log -1 --format=%cn origin/$branch || echo "Unknown")
if [[ $(date -d "$last_commit_date" +%s) -lt $(date -d '3 months ago' +%s) ]]; then
committed_in_branch=$(git branch -r --contains "origin/$branch" | tr -d ' ' | paste -sd "," -)
echo "$branch,$last_commit_date,$committer_name,$committed_in_branch,Delete" >> merged_branches_report.csv
fi
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload CSV Report of Inactive Branches
uses: actions/upload-artifact@v6
with:
name: merged-branches-report
path: merged_branches_report.csv
retention-days: 30
34 changes: 34 additions & 0 deletions .github/workflows/telemetry-template-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: validate template property for telemetry

on:
pull_request:
branches:
- main
paths:
- 'content-gen/azure.yaml'

permissions:
contents: read
actions: read

jobs:
validate-template-property:
name: validate-template-property
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Check for required metadata template line
run: |
if grep -E '^\s*#\s*template:\s*content-generation@' content-gen/azure.yaml; then
echo "ERROR: 'template' line is commented out in content-gen/azure.yaml! Please uncomment template line."
exit 1
fi

if ! grep -E '^\s*template:\s*content-generation@' content-gen/azure.yaml; then
echo "ERROR: Required 'template' line is missing in content-gen/azure.yaml! Please add template line for telemetry."
exit 1
fi
echo "template line is present and not commented."
69 changes: 69 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Test Workflow with Coverage

on:
push:
branches:
- main
- dev
paths:
- '**/*.py'
- 'content-gen/src/backend/requirements*.txt'
- '.github/workflows/test.yml'
pull_request:
types:
- opened
- ready_for_review
- reopened
- synchronize
branches:
- main
- dev
paths:
- '**/*.py'
- 'content-gen/src/backend/requirements*.txt'
- '.github/workflows/test.yml'

permissions:
contents: read
actions: read

jobs:
backend_tests:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"

- name: Install Backend Dependencies
run: |
python -m pip install --upgrade pip
pip install -r content-gen/src/backend/requirements.txt
pip install pytest-cov
pip install pytest-asyncio

- name: Check if Backend Test Files Exist
id: check_backend_tests
run: |
if [ -z "$(find content-gen/src/tests -type f -name 'test_*.py' 2>/dev/null)" ]; then
echo "No backend test files found, skipping backend tests."
echo "skip_backend_tests=true" >> $GITHUB_ENV
else
echo "Backend test files found, running tests."
echo "skip_backend_tests=false" >> $GITHUB_ENV
fi

- name: Run Backend Tests with Coverage
if: env.skip_backend_tests == 'false'
run: |
pytest --cov=. --cov-report=term-missing --cov-report=xml ./content-gen/src/tests

- name: Skip Backend Tests
if: env.skip_backend_tests == 'true'
run: |
echo "Skipping backend tests because no test files were found."
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ Follow the quick deploy steps on the deployment guide to deploy this solution to
<br/>

> ⚠️ **Important: Check Azure OpenAI Quota Availability**
<br/>To ensure sufficient quota is available in your subscription, please follow [quota check instructions guide](./docs/QuotaCheck.md) before you deploy the solution.
<br/>To ensure sufficient quota is available in your subscription, please follow [quota check instructions guide](./content-gen/docs/QuotaCheck.md) before you deploy the solution.

<br/>

### Prerequisites and costs

To deploy this solution accelerator, ensure you have access to an [Azure subscription](https://azure.microsoft.com/free/) with the necessary permissions to create **resource groups, resources, app registrations, and assign roles at the resource group level**. This should include Contributor role at the subscription level and Role Based Access Control role on the subscription and/or resource group level. Follow the steps in [Azure Account Set Up](./docs/AzureAccountSetUp.md).
To deploy this solution accelerator, ensure you have access to an [Azure subscription](https://azure.microsoft.com/free/) with the necessary permissions to create **resource groups, resources, app registrations, and assign roles at the resource group level**. This should include Contributor role at the subscription level and Role Based Access Control role on the subscription and/or resource group level. Follow the steps in [Azure Account Set Up](./content-gen/docs/AzureAccountSetUp.md).

Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/?products=all&regions=all) page and select a **region** where the following services are available.

Expand Down
3 changes: 1 addition & 2 deletions content-gen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ BRAND_SECONDARY_COLOR=#107C10
- [AZD Deployment Guide](docs/AZD_DEPLOYMENT.md) - Deploy with Azure Developer CLI
- [Manual Deployment Guide](docs/DEPLOYMENT.md) - Step-by-step manual deployment
- [Image Generation Configuration](docs/IMAGE_GENERATION.md) - DALL-E 3 and GPT-Image-1 setup
- [API Reference](docs/API.md)

## License

MIT License - See [LICENSE](LICENSE) for details.
MIT License - See [LICENSE](../LICENSE) for details.
4 changes: 2 additions & 2 deletions content-gen/azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ hooks:
Write-Host "AI Search Index: " -NoNewline
Write-Host "$env:AZURE_AI_SEARCH_PRODUCTS_INDEX" -ForegroundColor Cyan
Write-Host "AI Service Location: " -NoNewline
Write-Host "$env:AI_SERVICE_LOCATION" -ForegroundColor Cyan
Write-Host "$env:AZURE_ENV_OPENAI_LOCATION" -ForegroundColor Cyan
Write-Host "Container Instance: " -NoNewline
Write-Host "$env:CONTAINER_INSTANCE_NAME" -ForegroundColor Cyan

Expand Down Expand Up @@ -112,7 +112,7 @@ hooks:
echo "Storage Account: $AZURE_BLOB_ACCOUNT_NAME"
echo "AI Search Service: $AI_SEARCH_SERVICE_NAME"
echo "AI Search Index: $AZURE_AI_SEARCH_PRODUCTS_INDEX"
echo "AI Service Location: $AI_SERVICE_LOCATION"
echo "AI Service Location: $AZURE_ENV_OPENAI_LOCATION"
echo "Container Instance: $CONTAINER_INSTANCE_NAME"

echo ""
Expand Down
Loading