Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch-PRTitles #96846

Closed
wants to merge 61 commits into from
Closed

Conversation

stephengillie
Copy link
Collaborator

@stephengillie stephengillie commented Feb 15, 2023

Streamlines Winget-pkgs manifest PR moderator approval by watching the clipboard - copy a PR title to your clipboard, and Watch-PRTitles attempts to parse the PackageIdentifier and version number, gathers the version from Winget, and gives feedback in your PowerShell console. Also outputs valid titles to a logging file. Freeing moderators to focus on approving and helping.

Microsoft Reviewers: Open in CodeFlow

@wingetbot
Copy link
Collaborator

Service Badge  Service Badge  

@microsoft-github-policy-service
Copy link
Contributor

stephengillie,

Changes to one or more files in your PR require authorization to modify. This PR has been assigned to our on call staff to evaluate.

Template: msftbot/requiresApproval/MSFT

@denelon
Copy link
Contributor

denelon commented Feb 15, 2023

This might be interesting to Community Moderators:

Tools/PRWatcher.ps1 Outdated Show resolved Hide resolved
Tools/PRWatcher.ps1 Outdated Show resolved Hide resolved
@Trenly
Copy link
Contributor

Trenly commented Feb 15, 2023

I must be doing something wrong, because every single time I get the error Cannot convert value "" to type "System.Version" even when using titles that seem like they should work. A help file or docs on how to use would be appreciated

@stephengillie
Copy link
Collaborator Author

I must be doing something wrong, because every single time I get the error Cannot convert value "" to type "System.Version" even when using titles that seem like they should work. A help file or docs on how to use would be appreciated

This takes as input copying the whole title, from the PR page, such as Automatic deletion of Caphyon.AdvancedInstaller 20.3 #96843 or Update: KDE.KDEConnect version 22.12.2 #96840. Output should appear like this, but with colors:

15:55:08: Caphyon.AdvancedInstaller prVersion wingetVersion is greater than wingetVersion 20.3.2
15:55:14: KDE.KDEConnect prVersion 22.12.2 is equal to wingetVersion 22.12.2

But it does have issues with non-semantic versions such as these: https://github.com/microsoft/winget-pkgs/search?o=desc&q=chrisant996.Clink&s=committer-date&type=commits

Apologies for the issues and insufficient testing.

@Trenly
Copy link
Contributor

Trenly commented Feb 15, 2023

I must be doing something wrong, because every single time I get the error Cannot convert value "" to type "System.Version" even when using titles that seem like they should work. A help file or docs on how to use would be appreciated

This takes as input copying the whole title, from the PR page, such as Automatic deletion of Caphyon.AdvancedInstaller 20.3 #96843 or Update: KDE.KDEConnect version 22.12.2 #96840. Output should appear like this, but with colors:

15:55:08: Caphyon.AdvancedInstaller prVersion wingetVersion is greater than wingetVersion 20.3.2
15:55:14: KDE.KDEConnect prVersion 22.12.2 is equal to wingetVersion 22.12.2

But it does have issues with non-semantic versions such as these: https://github.com/microsoft/winget-pkgs/search?o=desc&q=chrisant996.Clink&s=committer-date&type=commits

Apologies for the issues and insufficient testing.

I'll try and get a screengrab to show my end

@Trenly
Copy link
Contributor

Trenly commented Feb 16, 2023

@stephengillie
Copy link
Collaborator Author

Automatic deletion of Caphyon.AdvancedInstaller 20.3 #96843

Ah. This is because you're copying most of the title line Update: KDE.KDEConnect version 22.12.2 and omitting the PR number #96840

It's currently written to expect the whole title: Update: KDE.KDEConnect version 22.12.2 #96840. I've added a fix for this.

@Trenly
Copy link
Contributor

Trenly commented Feb 16, 2023

Automatic deletion of Caphyon.AdvancedInstaller 20.3 #96843

Ah. This is because you're copying most of the title line Update: KDE.KDEConnect version 22.12.2 and omitting the PR number #96840

It's currently written to expect the whole title: Update: KDE.KDEConnect version 22.12.2 #96840. I've added a fix for this.

Aha! I knew I must be doing something wrong!

Copy link
Contributor

@mdanish-kh mdanish-kh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List of warnings from PowerShell extension of VSCode.

image

Nit: We should also trim trailing whitespaces from the script using VSCode or some other editor.

Tools/PRWatcher.ps1 Outdated Show resolved Hide resolved
Tools/PRWatcher.ps1 Outdated Show resolved Hide resolved
Tools/PRWatcher.ps1 Outdated Show resolved Hide resolved
Tools/PRWatcher.ps1 Outdated Show resolved Hide resolved
Tools/PRWatcher.ps1 Outdated Show resolved Hide resolved
Tools/PRWatcher.ps1 Outdated Show resolved Hide resolved
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback This needs a response from the author. label Feb 16, 2023
@microsoft-github-policy-service
Copy link
Contributor

Hello @stephengillie,

The package manager bot determined changes have been requested to your PR.

Template: msftbot/changesRequested

doc/tools/PRWatcher.md Outdated Show resolved Hide resolved
@microsoft-github-policy-service
Copy link
Contributor

Hello @stephengillie,

The package manager bot determined changes have been requested to your PR.

Template: msftbot/changesRequested

@denelon denelon mentioned this pull request Feb 17, 2023
4 tasks
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Author-Feedback This needs a response from the author. label Feb 20, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Moderator-Approved One of the Moderators has reviewed and approved this PR label Jul 2, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Moderator-Approved One of the Moderators has reviewed and approved this PR label Jul 26, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Moderator-Approved One of the Moderators has reviewed and approved this PR label Jul 28, 2023
@wingetbot wingetbot added the Validation-Merge-Conflict Package could not be tested due to merge conflict. label Aug 15, 2023
@microsoft-github-policy-service
Copy link
Contributor

Hello @stephengillie,

The PR could not be validated because there is a merge conflict which adds bad characters to the manifest. Please address the merge conflict and resubmit.

Template: msftbot/mergeConflict

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback This needs a response from the author. Needs-Attention This work item needs to be reviewed by a member of the core team. labels Aug 15, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot removed Needs-Attention This work item needs to be reviewed by a member of the core team. Needs-Author-Feedback This needs a response from the author. Moderator-Approved One of the Moderators has reviewed and approved this PR Unexpected-File Validation-Merge-Conflict Package could not be tested due to merge conflict. labels Aug 15, 2023
@stephengillie stephengillie deleted the WatchPackages branch December 20, 2023 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants