Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit e4d831b

Browse files
authored
Merge branch 'master' into fixes/1859-missing-MEF-exports
2 parents d5a9bc3 + 208c34e commit e4d831b

File tree

163 files changed

+2854
-466
lines changed

Some content is hidden

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

163 files changed

+2854
-466
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ This project adheres to the [Open Code of Conduct][code-of-conduct]. By particip
1313

1414
## Submitting a pull request
1515

16-
0. [Fork][] and clone the repository (see Build Instructions in the [README][readme])
17-
0. Create a new branch: `git checkout -b my-branch-name`
18-
0. Make your change, add tests, and make sure the tests still pass
19-
0. Push to your fork and [submit a pull request][pr]
20-
0. Pat your self on the back and wait for your pull request to be reviewed and merged.
16+
1. [Fork][] and clone the repository (see Build Instructions in the [README][readme])
17+
2. Create a new branch: `git checkout -b my-branch-name`
18+
3. Make your change, add tests, and make sure the tests still pass
19+
4. Push to your fork and [submit a pull request][pr]
20+
5. Pat your self on the back and wait for your pull request to be reviewed and merged.
2121

2222
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
2323

24-
- Follow the existing code's style.
25-
- Write tests.
24+
- Follow the style/format of the existing code.
25+
- Write tests for your changes.
2626
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
2727
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
2828

@@ -38,7 +38,7 @@ There are certain areas of the extension that are restricted in what they can do
3838
### Bug Reporting
3939

4040
Here are a few helpful tips when reporting a bug:
41-
- Verify the bug resides in the GitHub for Visual Studio extension
41+
- Verify that the bug resides in the GitHub for Visual Studio extension
4242
- A lot of functionality provided by this extension resides in the Team Explorer pane, alongside other non-GitHub tools to manage and collaborate on source code, including Visual Studio's Git support, which is owned by Microsoft.
4343
- If this bug not is related to the GitHub extension, visit the [Visual Studio support page](https://www.visualstudio.com/support/support-overview-vs) for help
4444
- Screenshots are very helpful in diagnosing bugs and understanding the state of the extension when it's experiencing problems. Please include them whenever possible.

ISSUE_TEMPLATE.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
1-
Hello! Please read the contributing guidelines before submitting an issue regarding the GitHub Extension for Visual Studio.
1+
<!-- Hello! Please read the [contributing guidelines](https://github.com/github/VisualStudio/blob/master/CONTRIBUTING.md) before submitting an issue regarding the GitHub Extension for Visual Studio. -->
2+
3+
## Version
24

35
- GitHub Extension for Visual Studio version:
46
- Visual Studio version:
57

6-
__What happened__ (with steps, logs and screenshots, if possible)
8+
## What happened
9+
10+
**Steps to Reproduce**
11+
12+
1. [First Step]
13+
2. [Second Step]
14+
3. [and so on...]
15+
16+
**Expected behavior:** [What you expect to happen]
17+
18+
**Actual behavior:** [What actually happens]
19+
20+
**Screenshot or GIF:**
21+
22+
**Log file:**
23+
24+
<!-- Include the log file. Logs can be found at: `%LOCALAPPDATA%\GitHubVisualStudio\extension.log` -->

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ To build and install a `Release` configuration VSIX:
8585
build.cmd Release
8686
install.cmd Release
8787
```
88+
## Logs
89+
Logs can be viewed at the following location:
90+
91+
`%LOCALAPPDATA%\GitHubVisualStudio\extension.log`
8892

8993
## More information
9094
- Andreia Gaita's [presentation](https://www.youtube.com/watch?v=hz2hCO8e_8w) at Codemania 2016 about this extension.

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
os: Visual Studio 2017
2-
version: '2.5.4.{build}'
2+
version: '2.5.5.{build}'
33
skip_tags: true
44
install:
55
- ps: |

docs/developer/how-viewmodels-are-turned-into-views.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ This is the basis for converting view models to views.
6565

6666
There are currently two top-level controls for our UI:
6767

68-
- [GitHubDialogWindow](../src/GitHub.VisualStudio/Views/Dialog/GitHubDialogWindow.xaml) for the dialog which shows the login, clone, etc views
69-
- [GitHubPaneView](../src/GitHub.VisualStudio/Views/GitHubPane/GitHubPaneView.xaml) for the GitHub pane
68+
- [GitHubDialogWindow](../../src/GitHub.VisualStudio/Views/Dialog/GitHubDialogWindow.xaml) for the dialog which shows the login, clone, etc views
69+
- [GitHubPaneView](../../src/GitHub.VisualStudio/Views/GitHubPane/GitHubPaneView.xaml) for the GitHub pane
7070

7171
In the resources for each of these top-level controls we define a `DataTemplate` like so:
7272

@@ -77,10 +77,10 @@ In the resources for each of these top-level controls we define a `DataTemplate`
7777
</DataTemplate>
7878
```
7979

80-
The `DataTemplate.DataType` here applies the template to all classes inherited from [`GitHub.ViewModels.ViewModelBase`](../src/GitHub.Exports.Reactive/ViewModels/ViewModelBase.cs) [1]. The template defines a single `ContentControl` whose contents are created by a `ViewLocator`.
80+
The `DataTemplate.DataType` here applies the template to all classes inherited from [`GitHub.ViewModels.ViewModelBase`](../../src/GitHub.Exports.Reactive/ViewModels/ViewModelBase.cs) [1]. The template defines a single `ContentControl` whose contents are created by a `ViewLocator`.
8181

82-
The [`ViewLocator`](../src/GitHub.VisualStudio/Views/ViewLocator.cs) class is an `IValueConverter` which then creates an instance of the appropriate view for the view model using MEF.
82+
The [`ViewLocator`](../../src/GitHub.VisualStudio/Views/ViewLocator.cs) class is an `IValueConverter` which then creates an instance of the appropriate view for the view model using MEF.
8383

8484
And thus a view model becomes a view.
8585

86-
[1]: it would be nice to make it apply to all classes that inherit `IViewModel` but unfortunately WPF's `DataTemplate`s don't work with interfaces.
86+
[1]: it would be nice to make it apply to all classes that inherit `IViewModel` but unfortunately WPF's `DataTemplate`s don't work with interfaces.
194 KB
Binary file not shown.

src/GitHub.Api/GitHub.Api.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
5151
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
5252
</Reference>
53-
<Reference Include="Octokit.GraphQL, Version=0.1.0.0, Culture=neutral, PublicKeyToken=0be8860aee462442, processorArchitecture=MSIL">
54-
<HintPath>..\..\packages\Octokit.GraphQL.0.1.0-beta\lib\netstandard1.1\Octokit.GraphQL.dll</HintPath>
53+
<Reference Include="Octokit.GraphQL, Version=0.1.1.0, Culture=neutral, PublicKeyToken=0be8860aee462442, processorArchitecture=MSIL">
54+
<HintPath>..\..\packages\Octokit.GraphQL.0.1.1-beta\lib\netstandard1.1\Octokit.GraphQL.dll</HintPath>
5555
</Reference>
56-
<Reference Include="Octokit.GraphQL.Core, Version=0.1.0.0, Culture=neutral, PublicKeyToken=0be8860aee462442, processorArchitecture=MSIL">
57-
<HintPath>..\..\packages\Octokit.GraphQL.0.1.0-beta\lib\netstandard1.1\Octokit.GraphQL.Core.dll</HintPath>
56+
<Reference Include="Octokit.GraphQL.Core, Version=0.1.1.0, Culture=neutral, PublicKeyToken=0be8860aee462442, processorArchitecture=MSIL">
57+
<HintPath>..\..\packages\Octokit.GraphQL.0.1.1-beta\lib\netstandard1.1\Octokit.GraphQL.Core.dll</HintPath>
5858
</Reference>
5959
<Reference Include="Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
6060
<HintPath>..\..\packages\Serilog.2.5.0\lib\net46\Serilog.dll</HintPath>

src/GitHub.Api/GraphQLKeychainCredentialStore.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Threading;
23
using System.Threading.Tasks;
34
using GitHub.Extensions;
45
using GitHub.Primitives;
@@ -23,7 +24,7 @@ public GraphQLKeychainCredentialStore(IKeychain keychain, HostAddress address)
2324
this.address = address;
2425
}
2526

26-
public async Task<string> GetCredentials()
27+
public async Task<string> GetCredentials(CancellationToken cancellationToken = default)
2728
{
2829
var userPass = await keychain.Load(address).ConfigureAwait(false);
2930
return userPass?.Item2;

src/GitHub.Api/ILoginManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Task<User> LoginWithToken(
7272
/// Logs out of GitHub server.
7373
/// </summary>
7474
/// <param name="hostAddress">The address of the server.</param>
75+
/// <param name="client">An octokit client configured to access the server.</param>
7576
Task Logout(HostAddress hostAddress, IGitHubClient client);
7677
}
7778
}

src/GitHub.Api/LoginManager.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ public class LoginManager : ILoginManager
3434
/// </summary>
3535
/// <param name="keychain">The keychain in which to store credentials.</param>
3636
/// <param name="twoFactorChallengeHandler">The handler for 2FA challenges.</param>
37+
/// <param name="oauthListener">The callback listener to signal successful login.</param>
3738
/// <param name="clientId">The application's client API ID.</param>
3839
/// <param name="clientSecret">The application's client API secret.</param>
40+
/// <param name="scopes">List of scopes to authenticate for</param>
3941
/// <param name="authorizationNote">An note to store with the authorization.</param>
4042
/// <param name="fingerprint">The machine fingerprint.</param>
4143
public LoginManager(

0 commit comments

Comments
 (0)