Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 0 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,17 +247,7 @@ jobs:
# Enable Playwright trace/video/screenshot capture for E2E jobs
PLAYWRIGHT_ARTIFACTS: >-
${{ matrix.requires_playwright && 'true' || 'false' }}
Auth0__Domain: ${{ secrets.AUTH0_DOMAIN }}
Auth0__ClientId: ${{ secrets.AUTH0_CLIENT_ID }}
Auth0__ClientSecret: ${{ secrets.AUTH0_CLIENT_SECRET }}
Auth0Management__ClientId: ${{ secrets.AUTH0_MANAGEMENT_CLIENT_ID }}
Auth0Management__ClientSecret: ${{ secrets.AUTH0_MANAGEMENT_CLIENT_SECRET }}
Auth0Management__Domain: ${{ secrets.AUTH0_DOMAIN }}
Auth0Management__Audience: https://${{ secrets.AUTH0_DOMAIN }}/api/v2/
MongoDB__ConnectionString: ${{ secrets.MONGODB_CONNECTION_STRING }}
# Aspire parameter bindings for AppHost.Tests
Parameters__auth0MgmtClientId: ${{ secrets.AUTH0_MANAGEMENT_CLIENT_ID }}
Parameters__auth0MgmtClientSecret: ${{ secrets.AUTH0_MANAGEMENT_CLIENT_SECRET }}
# Required by AppHost's AddConnectionString("mongodb") even though the
# web app ignores it in Testing mode.
ConnectionStrings__mongodb: "mongodb://localhost:27017"
Expand Down
43 changes: 20 additions & 23 deletions .github/workflows/code-metrics.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
---
name: ".NET code metrics"

# The pinned metrics action doesn't count the members of classes declared
# with a primary constructor. IssueTracker has none in src/; if that changes,
# switch to manual runs only, as atelier-store did.
# Manual runs only, for now. The pinned metrics action does not count the
# members of classes declared with a primary constructor, so it reports every
# service and repository in src/ as empty. Restore the push and pull_request
# triggers once the action handles primary constructors.
Comment thread
mpaulosky marked this conversation as resolved.
Resolved
"on":
push:
branches:
- main
paths-ignore:
- "**/CODE_METRICS.md"
pull_request:
branches:
- main
paths-ignore:
- "**/CODE_METRICS.md"
workflow_dispatch:
inputs:
reason:
description: "The reason for running the workflow"
required: true
default: "Manual run"
# Off by default: the reports undercount primary-constructor classes, so
# a run only shows them in the log unless publishing is asked for.
publish:
description: "Open a pull request with the updated CODE_METRICS.md"
required: false
type: boolean
default: false

# Read-only on purpose: pull_request runs execute the unpinned metrics action
# and must not get a write-capable token. The main-only PR step below pushes
# and opens the PR with RELEASE_PR_PAT instead.
# Read-only on purpose: the job runs a third-party action and needs no write
# access itself. The main-only PR step below pushes and opens the PR with
# RELEASE_PR_PAT instead.
permissions:
contents: read

Expand All @@ -48,8 +46,8 @@ jobs:
echo "Reason: $REASON"
- name: .NET code metrics
id: dotnet-code-metrics
# Pinned to an audited commit: pull request runs execute this external
# action, so an upstream change mustn't reach them unreviewed.
# Pinned to an audited commit, so an upstream change to this external
# action can't run here unreviewed.
uses: dotnet/samples/github-actions/DotNet.GitHubAction@acb39ceb13f910ae0f8f6298059c59102b749c41 # main as of 2026-09-26
env:
GREETINGS: "Hello, .NET developers!" # ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -59,12 +57,11 @@ jobs:
branch: ${{ github.ref }}
dir: ${{ './' }}

# Only open a metrics PR from main. Pull request runs check out a detached
# merge commit (refs/pull/N/merge), which create-pull-request can't use as a
# base, and a manual run from another branch must not publish metrics either.
# Only open a metrics PR when asked to, and only from main: a run from
# another branch must not publish metrics.
- name: Create pull request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
if: ${{ github.ref == 'refs/heads/main' && steps.dotnet-code-metrics.outputs.updated-metrics == 'true' && env.HAS_RELEASE_PR_PAT == 'true' }}
if: ${{ inputs.publish && github.ref == 'refs/heads/main' && steps.dotnet-code-metrics.outputs.updated-metrics == 'true' && env.HAS_RELEASE_PR_PAT == 'true' }}
with:
# [skip-release]: a metrics refresh isn't a release.
title: "${{ steps.dotnet-code-metrics.outputs.summary-title }} [skip-release]"
Expand All @@ -77,5 +74,5 @@ jobs:
token: ${{ secrets.RELEASE_PR_PAT }}

- name: Report skipped metrics pull request
if: ${{ github.ref == 'refs/heads/main' && steps.dotnet-code-metrics.outputs.updated-metrics == 'true' && env.HAS_RELEASE_PR_PAT != 'true' }}
if: ${{ inputs.publish && github.ref == 'refs/heads/main' && steps.dotnet-code-metrics.outputs.updated-metrics == 'true' && env.HAS_RELEASE_PR_PAT != 'true' }}
run: echo "::notice::RELEASE_PR_PAT is not set, so the updated CODE_METRICS.md wasn't opened as a pull request."
Loading
Loading