Skip to content

Commit d0f55b4

Browse files
authored
Merge branch 'main' into patch-1
2 parents 468d557 + c6cbbc5 commit d0f55b4

File tree

146 files changed

+5853
-1118
lines changed

Some content is hidden

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

146 files changed

+5853
-1118
lines changed

.devcontainer/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Start from the .NET 8 devcontainer image
2+
FROM mcr.microsoft.com/devcontainers/dotnet:9.0
3+
4+
# Set up apt and install Just as a task runner
5+
RUN apt-get update \
6+
&& apt-get install -y curl ca-certificates gnupg \
7+
&& curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin \
8+
&& apt-get clean \
9+
&& rm -rf /var/lib/apt/lists/*

.devcontainer/devcontainer.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
{
22
"name": "C# (.NET)",
3-
"image": "mcr.microsoft.com/devcontainers/dotnet:8.0",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
46

57
// Configure tool-specific properties.
68
"customizations": {
7-
// Configure properties specific to VS Code.
8-
"vscode": {
9-
// Add the IDs of extensions you want installed when the container is created.
9+
"vscode": {
1010
"extensions": [
1111
"ms-dotnettools.csdevkit",
1212
"github.copilot",
1313
"ms-vscode.powershell"
1414
]
1515
}
1616
},
17+
1718
"features": {
1819
"ghcr.io/devcontainers/features/github-cli:1": {}
1920
},
21+
2022
"remoteUser": "vscode"
21-
}
23+
}

.github/copilot-instructions.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
This is a C# based repository that produces several CLIs that are used by customers to interact with the GitHub migration APIs. Please follow these guidelines when contributing:
2+
3+
## Code Standards
4+
5+
### Required Before Each Commit
6+
- Run `dotnet format src/OctoshiftCLI.sln` before committing any changes to ensure proper code formatting. This will run dotnet format on all C# files to maintain consistent style
7+
8+
### Development Flow
9+
- Build: `dotnet build src/OctoshiftCLI.sln /p:TreatWarningsAsErrors=true`
10+
- Test: `dotnet test src/OctoshiftCLI.Tests/OctoshiftCLI.Tests.csproj`
11+
12+
## Repository Structure
13+
- `src/`: Contains the main C# source code for the Octoshift CLI
14+
- `src/ado2gh/`: Contains the ADO to GH CLI commands
15+
- `src/bbs2gh/`: Contains the BBS to GH CLI commands
16+
- `src/gei/`: Contains the GitHub to GitHub CLI commands
17+
- `src/Octoshift/`: Contains shared logic used by multiple commands/CLIs
18+
- `src/OctoshiftCLI.IntegrationTests/`: Contains integration tests for the Octoshift CLI
19+
- `src/OctoshiftCLI.Tests/`: Contains unit tests for the Octoshift CLI
20+
21+
## Key Guidelines
22+
1. Follow C# best practices and idiomatic patterns
23+
2. Maintain existing code structure and organization
24+
4. Write unit tests for new functionality.
25+
5. When making changes that would impact our users (e.g. new features or bug fixes), add a bullet point to `RELEASENOTES.md` with a user friendly brief description of the change
26+
6. Never silently swallow exceptions.
27+
7. If an exception is expected/understood and we can give a helpful user-friendly message, then throw an OctoshiftCliException with a user-friendly message. Otherwise let the exception bubble up and the top-level exception handler will log and handle it appropriately.

0 commit comments

Comments
 (0)