You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
- 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.
- Fixed `ado2gh integrate-boards` command to properly report errors when GitHub PAT permissions are incorrect, instead of incorrectly reporting success.
thrownewOctoshiftCliException("Missing data from 'ms.vss-work-web.github-user-data-provider'. Please ensure the Azure DevOps project has a configured GitHub connection.");
vardataProviders=data["dataProviders"]??thrownewOctoshiftCliException("Missing data from 'ms.vss-work-web.github-user-data-provider'. Please ensure the Azure DevOps project has a configured GitHub connection.");
225
+
vardataProvider=dataProviders["ms.vss-work-web.github-user-data-provider"]??thrownewOctoshiftCliException("Missing data from 'ms.vss-work-web.github-user-data-provider'. Please ensure the Azure DevOps project has a configured GitHub connection.");
vardataProviders=data["dataProviders"]??thrownewOctoshiftCliException("Could not retrieve GitHub repository information. Please verify the repository exists and the GitHub token has the correct permissions.");
#pragma warning restore IDE0046// Convert to conditional expression
628
+
{
629
+
thrownewOctoshiftCliException("Could not retrieve GitHub repository information. Please verify the repository exists and the GitHub token has the correct permissions.");
0 commit comments