Skip to content

Commit 15fbed0

Browse files
Copilotjongalloway
andcommitted
Create comprehensive GitHub Copilot instructions for dotnet/core repository
Co-authored-by: jongalloway <68539+jongalloway@users.noreply.github.com>
1 parent a1a08f0 commit 15fbed0

4,472 files changed

Lines changed: 179 additions & 651108 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
# .NET Core Repository (dotnet/core)
2+
3+
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
4+
5+
This is the official .NET release notes and announcements repository. It is NOT a buildable codebase repository - it contains documentation, release notes, and metadata about .NET releases. You do not build applications here; you maintain release documentation and validate content.
6+
7+
## Working Effectively
8+
9+
### Initial Setup
10+
11+
Set up the validation tools needed for this documentation repository:
12+
13+
```bash
14+
npm install markdownlint-cli markdown-link-check prettier
15+
pip install checkov
16+
```
17+
18+
### Validation Commands
19+
20+
Always run these validation commands before committing changes. All commands have been tested and work correctly:
21+
22+
1. **Markdown linting** (takes ~1 second):
23+
24+
```bash
25+
npx markdownlint --config .github/linters/.markdown-lint.yml *.md
26+
npx markdownlint --config .github/linters/.markdown-lint.yml release-notes/**/*.md
27+
```
28+
29+
2. **Link checking** (takes 30-180 seconds depending on external links - NEVER CANCEL):
30+
31+
```bash
32+
npx markdown-link-check --config .github/workflows/markdown-link-check-config.json README.md
33+
npx markdown-link-check --config .github/workflows/markdown-link-check-config.json [specific-file].md
34+
```
35+
36+
TIMEOUT WARNING: Set timeout to 5+ minutes for link checking. External links may be slow or blocked by network restrictions.
37+
38+
3. **Security scanning with checkov** (takes ~38 seconds):
39+
40+
```bash
41+
checkov --config-file .checkov.yml --directory . --quiet
42+
```
43+
44+
4. **Format checking with prettier** (takes ~5 seconds):
45+
46+
```bash
47+
npx prettier --check --ignore-path .prettierignore .
48+
```
49+
50+
Note: This will show format warnings for most files but will not fail. Format fixing is typically not required unless specifically requested.
51+
52+
### Git Operations
53+
54+
Standard git workflow for documentation changes:
55+
56+
```bash
57+
git --no-pager status
58+
git --no-pager diff
59+
git add [specific-files]
60+
git commit -m "Descriptive commit message"
61+
git push origin [branch-name]
62+
```
63+
64+
## Repository Structure
65+
66+
### Key Directories
67+
68+
- `/release-notes/` - Version-specific release notes organized by major version (8.0/, 9.0/, 10.0/, etc.)
69+
- Each version has `releases.json`, `supported-os.json`, and markdown files for specific releases
70+
- `/release-notes/schemas/` - JSON schemas for release metadata
71+
- `/release-notes/templates/` - Templates for new release notes
72+
- `/Documentation/` - General documentation about .NET Core ecosystem and policies
73+
- `/.github/workflows/` - GitHub Actions for validation (super-linter, markdown-link-check, etc.)
74+
- Root level - Policy documents, README, CONTRIBUTING, and support information
75+
76+
### Important Files
77+
78+
- `README.md` - Main repository landing page with current release information
79+
- `releases.md` - Release schedule and support information
80+
- `release-policies.md` - .NET release and support policies
81+
- `release-notes/releases-index.json` - Master index of all .NET releases
82+
- `CONTRIBUTING.md` - Links to actual contribution guidelines in dotnet/runtime
83+
84+
## Common Tasks
85+
86+
### Adding New Release Notes
87+
88+
1. Navigate to appropriate version directory in `/release-notes/[version]/`
89+
2. Create new markdown file following existing naming convention (e.g., `9.0.8.md`)
90+
3. Update `releases.json` with new release metadata
91+
4. Update root `README.md` if this is a latest patch version
92+
5. Run all validation commands
93+
6. Check that links work and markdown is properly formatted
94+
95+
### Updating Release Metadata
96+
97+
Release metadata is stored in JSON files:
98+
99+
- `release-notes/releases-index.json` - Master index
100+
- `release-notes/[version]/releases.json` - Version-specific releases
101+
- `release-notes/[version]/supported-os.json` - Supported operating systems
102+
103+
Always validate JSON syntax and schema compliance after edits.
104+
105+
### Updating Documentation
106+
107+
1. Edit markdown files in `/Documentation/` or root level
108+
2. Run markdown linting: `npx markdownlint --config .github/linters/.markdown-lint.yml [file]`
109+
3. Check links: `npx markdown-link-check --config .github/workflows/markdown-link-check-config.json [file]`
110+
4. Verify changes don't break existing navigation or references
111+
112+
## Validation Requirements
113+
114+
### Before Every Commit
115+
116+
Always run these validation steps in order:
117+
118+
1. Markdown linting (must pass without errors)
119+
2. Link checking (external links may fail due to network restrictions - this is acceptable)
120+
3. Security scanning with checkov (must pass)
121+
4. Format checking (warnings are acceptable)
122+
123+
### Manual Validation Scenarios
124+
125+
Since this is a documentation repository, manual validation involves:
126+
127+
1. **Link verification**: Navigate to updated pages and verify internal links work
128+
2. **Content accuracy**: Ensure release notes match actual .NET releases
129+
3. **JSON schema validation**: Ensure metadata files follow required schema
130+
4. **Cross-reference checking**: Verify links between release notes and main README are consistent
131+
132+
### CI/CD Integration
133+
134+
The repository uses GitHub Actions workflows:
135+
136+
- `.github/workflows/super-linter.yml` - Runs comprehensive linting
137+
- `.github/workflows/markdown-link-check.yml` - Validates markdown links
138+
- All other workflow files are for issue/PR labeling automation
139+
140+
## Timing Expectations
141+
142+
| Command | Expected Time | Timeout Setting |
143+
| --------------------- | -------------- | --------------- |
144+
| markdownlint | 1 second | 30 seconds |
145+
| markdown-link-check | 30-180 seconds | 5+ minutes |
146+
| checkov security scan | 38 seconds | 2 minutes |
147+
| prettier format check | 5 seconds | 30 seconds |
148+
149+
NEVER CANCEL these commands early. Network-dependent operations like link checking may take longer than expected.
150+
151+
## Troubleshooting
152+
153+
### Common Issues
154+
155+
1. **JSON syntax errors**: Use a JSON validator before committing changes to .json files
156+
2. **Broken internal links**: Verify relative paths are correct and files exist
157+
3. **External link failures**: These are often due to network restrictions and may be acceptable
158+
4. **Markdown formatting**: Follow existing patterns in similar files
159+
5. **Schema validation failures**: Ensure JSON metadata follows schemas in `/release-notes/schemas/`
160+
161+
### Network Restrictions
162+
163+
Some external links may fail during link checking due to network restrictions in CI environments. This is expected and acceptable as long as internal links work correctly.
164+
165+
## Related Repositories
166+
167+
This repository links to many other .NET repositories:
168+
169+
- `dotnet/runtime` - Core .NET runtime and libraries
170+
- `dotnet/sdk` - .NET SDK
171+
- `dotnet/aspnetcore` - ASP.NET Core
172+
- See `Documentation/core-repos.md` for complete list
173+
174+
Do not attempt to build, run, or test code here. This repository contains only documentation and metadata about the .NET ecosystem.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,8 @@ bld/
4242
msbuild.log
4343
msbuild.err
4444
msbuild.wrn
45+
46+
# Node.js build artifacts
47+
node_modules/
48+
package-lock.json
49+
package.json

node_modules/.bin/escodegen

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/esgenerate

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/esparse

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/esvalidate

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/glob

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/js-yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/katex

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/markdown-it

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)