microsoft / PowerShellForGitHub

Microsoft PowerShell wrapper for GitHub API
Other
582 stars 184 forks source link

Add support for repository autolink #371

Closed henkmeulekamp closed 10 months ago

henkmeulekamp commented 1 year ago

Description

Implement basic support for autolinks (s) on a repository.

I'm quite new to writing PowerShell Modules, let me know If I missed something.

Issues Fixed

References

https://docs.github.com/en/rest/repos/autolinks#create-an-autolink-reference-for-a-repository

{ "id": 1, "key_prefix": "TICKET-", "url_template": "https://example.com/TICKET?query=", "is_alphanumeric": true }

Get-GitHubRepositoryAutoLink  [-OwnerName <String>] [-RepositoryName <String>] [-AccessToken <String>]

New-GitHubRepositoryAutoLink  [-OwnerName <String>] [-RepositoryName <String>] [-AccessToken <String>] 
  [-KeyPrefix <String>]  [-UrlTemplate <String>]  [-IsNumeric] 

Remove-GitHubRepositoryAutoLink  [-OwnerName <String>] [-RepositoryName <String>] [-AccessToken <String>] 
  [-AutoLinkId] <Int64> [-Force] [-WhatIf] [-Confirm]

Checklist

henkmeulekamp commented 1 year ago

@microsoft-github-policy-service agree

henkmeulekamp commented 1 year ago

Resolved most of the comments, many thanks for bringing these up. I missed some obvious things on the first run.. maybe due to focusing to much on PowerShell working itself.

Will have another look at the tests and fix the 2 todo comments.

Many thanks for the review so far. Learning a lot of PowerShell constructs/wow. Will resubmit PR after addressing the last open points.

microsoft-github-policy-service[bot] commented 1 year ago

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 14 days of this comment.

microsoft-github-policy-service[bot] commented 10 months ago

This pull request has been automatically closed due to a lack of activity from the author. We understand. Life happens and other things likely came up. We would still love to see your contribution get merged in. Now that it has been closed, a different community member may wish to pick up where you left off. If so, they should speak up by commenting below. If you're still interested in completing this yourself, just respond back and let us know.