Skip to content

Commit

Permalink
Merge pull request #204 from microsoft/main
Browse files Browse the repository at this point in the history
Staging - 8/8/23
  • Loading branch information
EricJohnson327 authored Aug 8, 2023
2 parents b0df4ed + 07ac6ae commit 09a0556
Show file tree
Hide file tree
Showing 11 changed files with 316 additions and 833 deletions.
829 changes: 0 additions & 829 deletions .github/fabricbot.json

This file was deleted.

20 changes: 20 additions & 0 deletions .github/policies/labelManagement.issueOpened.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
id: labelManagement.issueOpened
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
eventResponderTasks:
- description: Add Needs-Triage to new issues
if:
- payloadType: Issues
- isAction:
action: Opened
then:
- addLabel:
label: Needs-Triage
onFailure:
onSuccess:
43 changes: 43 additions & 0 deletions .github/policies/labelManagement.issueUpdated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
id: labelManagement.issueUpdated
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
eventResponderTasks:
- description: >-
If an author responds to an issue which needs author feedback
* Remove the Needs-Author-Feedback Label
* Add the Needs-Team-Response
if:
- payloadType: Issue_Comment
- isAction:
action: Created
- isActivitySender:
issueAuthor: True
- hasLabel:
label: Needs-Author-Feedback
- isOpen
then:
- removeLabel:
label: Needs-Author-Feedback
- addLabel:
label: Needs-Team-Response
- description: Remove "Status-No recent activity" when a pull request or issue is updated
if:
- payloadType: Issue_Comment
- hasLabel:
label: Status-No recent activity
then:
- removeLabel:
label: Status-No recent activity
- description: Clean email replies on every comment
if:
- payloadType: Issue_Comment
then:
- cleanEmailReply
onFailure:
onSuccess:
153 changes: 153 additions & 0 deletions .github/policies/moderatorTriggers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
id: moderatorTriggers
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
eventResponderTasks:
#
# /feedbackHub
- description: >-
Triggers:
* /feedbackhub
* /feedbackHub
if:
- payloadType: Issue_Comment
- commentContains:
pattern: '\/feedback[H|h]ub'
isRegex: True
- or:
- activitySenderHasAssociation:
association: Owner
- activitySenderHasAssociation:
association: Member
then:
- addReply:
reply: >-
Hi @${issueAuthor}. Please file this issue on Feedback Hub [Windows]+[f] and paste
the link here so we can more easily find your information on the back end. The link
can be found at the bottom of the feedback report. Please use "Apps" and "Dev Home"
for the Category.
- closeIssue
- removeLabel:
label: Needs-Triage
- removeLabel:
label: Needs-Team-Response
- addLabel:
label: Resolution-Please-File-on-Feedback-Hub
#
# /dupe
- description: >-
Example triggers:
* /dup of #000
* /dupe of #000
* Duplicate of #000 (preferred)
* Duplicate of https://github.com/microsoft/devhome/issues/000
if:
- payloadType: Issue_Comment
- commentContains:
pattern: '(\/)?[Dd]up(licate|e)?(\s+of)?\s+(\#[\d]+|https)'
isRegex: True
- or:
- activitySenderHasAssociation:
association: Owner
- activitySenderHasAssociation:
association: Member
then:
- addReply:
reply: >-
We've identified this as a duplicate of another one that already exists. This
specific instance is being closed in favor of tracking the concern over on the the
linked issue. Please add your 👍 to the other issue to raise its priority. Thanks
for your report!
- closeIssue
- removeLabel:
label: Needs-Triage
- removeLabel:
label: Needs-Team-Response
- addLabel:
label: Resolution-Duplicate
#
# /logs
- description: >-
Trigger:
* /logs
if:
- payloadType: Issue_Comment
- commentContains:
pattern: '\/logs)'
isRegex: True
- or:
- activitySenderHasAssociation:
association: Owner
- activitySenderHasAssociation:
association: Member
then:
- addReply:
reply: >-
Hi @${issueAuthor}. It would be helpful for us if you could share your Dev Home logs.
These logs can be found at
`%LOCALAPPDATA%\Packages\Microsoft.Windows.DevHome_8wekyb3d8bbwe\TempState` and
`%LOCALAPPDATA%\Packages\Microsoft.Windows.DevHomeGitHubExtension_8wekyb3d8bbwe\TempState`.
You can share these folders via a OneDrive link or zip them and attach them to a
comment here. If you share this way, you may want to look through the logs in case
there are any details included that you would like to remove (for example, private
repo names). Alternatively, you can open a Feedback Hub issue and attach them there.
If you use Feedback Hub, please paste the URL at the bottom of the report here so we
can easily find it.
- closeIssue
- removeLabel:
label: Needs-Triage
- removeLabel:
label: Needs-Team-Response
#
# /needinfo
- description: >-
Trigger:
* /needinfo
if:
- payloadType: Issue_Comment
- commentContains:
pattern: '\/needinfo'
isRegex: True
- or:
- activitySenderHasAssociation:
association: Owner
- activitySenderHasAssociation:
association: Member
then:
- removeLabel:
label: Needs-Triage
- removeLabel:
label: Needs-Team-Response
- addLabel:
label: Needs-Author-Feedback
#
# /loc
- description: >-
Trigger:
* /loc
if:
- payloadType: Issue_Comment
- commentContains:
pattern: '\/loc\b'
isRegex: True
- or:
- activitySenderHasAssociation:
association: Owner
- activitySenderHasAssociation:
association: Member
then:
- removeLabel:
label: Needs-Triage
- addLabel:
label: Loc-Sent To Team
- addReply:
reply: >-
Hi! Thanks for making us aware of the problem. We raised the issue with our internal
localization team.
onFailure:
onSuccess:
37 changes: 37 additions & 0 deletions .github/policies/scheduledSearch.closeNoRecentActivity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
id: scheduledSearch.closeNoRecentActivity
name: GitOps.PullRequestIssueManagement
description: Closes issues that are inactive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description: >-
Search for Issues where -
* Issue is Open
* Issue has the label Needs-Author-Feedback
* Issue has the label Status-No recent activity
* Issue does not have the label Issue-Feature
* Has not had activity in the last 5 days
Then -
* Close the Issue
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: Needs-Author-Feedback
- hasLabel:
label: Status-No recent activity
- isNotLabeledWith:
label: Issue-Feature
- noActivitySince:
days: 5
actions:
- closeIssue
onFailure:
onSuccess:
40 changes: 40 additions & 0 deletions .github/policies/scheduledSearch.markNoRecentActivity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
id: scheduledSearch.markNoRecentActivity
name: GitOps.PullRequestIssueManagement
description: Marks issues that are inactive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description: >-
Search for Issues where -
* Issue is Open
* Issue has the label Needs-Author-Feedback
* Issue does not have the label Status-No recent activity
* Issue does not have the label Issue-Feature
* Has not had activity in the last 5 days
Then -
* Mark the issue as Status-No recent activity
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: Needs-Author-Feedback
- noActivitySince:
days: 5
- isNotLabeledWith:
label: Status-No recent activity
- isNotLabeledWith:
label: Issue-Feature
actions:
- addLabel:
label: Status-No recent activity
- addReply:
reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **5 days**. It will be closed if no further activity occurs **within 5 days of this comment**.
onFailure:
onSuccess:
2 changes: 1 addition & 1 deletion build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ parameters:
- release

variables:
MSIXVersion: '0.300'
MSIXVersion: '0.400'
solution: '**/GITServices.sln'
appxPackageDir: 'AppxPackages'
testOutputArtifactDir: 'TestResults'
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/CreateBuildInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Param(
)

$Major = "0"
$Minor = "3"
$Minor = "4"
$Patch = "99" # default to 99 for local builds

$versionSplit = $Version.Split(".");
Expand Down
19 changes: 19 additions & 0 deletions src/GithubPlugin/DeveloperId/DeveloperIdProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ private List<OAuthRequest> OAuthRequests
get; set;
}

public AuthenticationState developerIDState
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}

// DeveloperIdProvider uses singleton pattern.
private static DeveloperIdProvider? singletonDeveloperIdProvider;

Expand All @@ -37,6 +43,9 @@ private List<OAuthRequest> OAuthRequests

public event EventHandler<IDeveloperId>? Updated;

// public event TypedEventHandler<IDeveloperIdProvider, object>? Changed;
private readonly AuthenticationExperienceKind authenticationExperienceForGithubPlugin = AuthenticationExperienceKind.CardSession;

// Private constructor for Singleton class.
private DeveloperIdProvider()
{
Expand Down Expand Up @@ -300,4 +309,14 @@ public IPluginAdaptiveCardController GetAdaptiveCardController(string[] args)
Log.Logger()?.ReportInfo($"GetAdaptiveCardController");
return new LoginUIController(loginEntryPoint);
}

public AuthenticationExperienceKind GetAuthenticationExperienceKind()
{
return authenticationExperienceForGithubPlugin;
}

public event TypedEventHandler<IDeveloperIdProvider, object>? Changed
{
add { } remove { }
}
}
2 changes: 1 addition & 1 deletion src/GithubPlugin/GithubPlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<PackageReference Include="Microsoft.Data.Sqlite" Version="7.0.4" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.1" />
<PackageReference Include="Microsoft.Windows.DevHome.SDK" Version="0.100.105" />
<PackageReference Include="Microsoft.Windows.DevHome.SDK" Version="0.100.212" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230331000" />
<PackageReference Include="Octokit" Version="5.0.4" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/GitHubPlugin/GitHubPlugin.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageReference Include="Dapper.Contrib" Version="2.0.78" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<PackageReference Include="Microsoft.Windows.DevHome.SDK" Version="0.100.105" />
<PackageReference Include="Microsoft.Windows.DevHome.SDK" Version="0.100.212" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230331000" />
Expand Down

0 comments on commit 09a0556

Please sign in to comment.