diff options
author | gregor herrmann <gregoa@debian.org> | 2022-10-08 17:26:11 +0200 |
---|---|---|
committer | gregor herrmann <gregoa@debian.org> | 2022-10-08 17:26:11 +0200 |
commit | b1a660b3ea7b75616796ec4bbd84e98c11f6b3b5 (patch) | |
tree | ebbc763011dfd3bfd5a8f46499b5dec5c6f381a1 | |
parent | 0b195e3f56c9918f65f32d749522f40a2360947d (diff) | |
parent | ce57ef6ff0bdeaac52e68779fc3765ef65ce1da9 (diff) |
Update upstream source from tag 'upstream/1.05'
Update to upstream version '1.05'
with Debian dir 3f357d23ebb644a9858007c618cead6ff11ea7c5
-rw-r--r-- | Changes | 6 | ||||
-rw-r--r-- | META.json | 2 | ||||
-rw-r--r-- | META.yml | 2 | ||||
-rw-r--r-- | Makefile.PL | 2 | ||||
-rw-r--r-- | lib/Net/GitHub.pm | 2 | ||||
-rw-r--r-- | lib/Net/GitHub/V3.pm | 2 | ||||
-rw-r--r-- | lib/Net/GitHub/V3/Actions.pm | 2 | ||||
-rw-r--r-- | lib/Net/GitHub/V3/Events.pm | 2 | ||||
-rw-r--r-- | lib/Net/GitHub/V3/Gists.pm | 2 | ||||
-rw-r--r-- | lib/Net/GitHub/V3/GitData.pm | 2 | ||||
-rw-r--r-- | lib/Net/GitHub/V3/Gitignore.pm | 2 | ||||
-rw-r--r-- | lib/Net/GitHub/V3/Issues.pm | 2 | ||||
-rw-r--r-- | lib/Net/GitHub/V3/OAuth.pm | 2 | ||||
-rw-r--r-- | lib/Net/GitHub/V3/PullRequests.pm | 2 | ||||
-rw-r--r-- | lib/Net/GitHub/V3/Query.pm | 2 | ||||
-rw-r--r-- | lib/Net/GitHub/V3/Repos.pm | 43 | ||||
-rw-r--r-- | lib/Net/GitHub/V3/ResultSet.pm | 2 | ||||
-rw-r--r-- | lib/Net/GitHub/V3/Users.pm | 2 | ||||
-rw-r--r-- | lib/Net/GitHub/V4.pm | 2 |
19 files changed, 65 insertions, 18 deletions
@@ -1,5 +1,11 @@ Revision history for Net-GitHub +1.05 2022-10-03 11:22:28 CST + - no code changes + +1.04 2022-10-03 11:20:30 CST + - branch protection (jrmash) + 1.03 2022-04-17 12:27:12 CST - revert #102 - merge #111 (PF4Public) @@ -70,7 +70,7 @@ "web" : "https://github.com/fayland/perl-net-github" } }, - "version" : "1.03", + "version" : "1.05", "x_contributors" : [ "Alan Berndt <alan@eatabrick.org>", "Alex Muntada <alexm@alexm.org>", @@ -36,7 +36,7 @@ resources: bugtracker: https://github.com/fayland/perl-net-github/issues homepage: https://github.com/fayland/perl-net-github repository: https://github.com/fayland/perl-net-github.git -version: '1.03' +version: '1.05' x_contributors: - 'Alan Berndt <alan@eatabrick.org>' - 'Alex Muntada <alexm@alexm.org>' diff --git a/Makefile.PL b/Makefile.PL index fc38f5f..2072d67 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -30,7 +30,7 @@ my %WriteMakefileArgs = ( "TEST_REQUIRES" => { "Test::More" => 0 }, - "VERSION" => "1.03", + "VERSION" => "1.05", "test" => { "TESTS" => "t/*.t" } diff --git a/lib/Net/GitHub.pm b/lib/Net/GitHub.pm index 04c874f..5dd9fd3 100644 --- a/lib/Net/GitHub.pm +++ b/lib/Net/GitHub.pm @@ -2,7 +2,7 @@ package Net::GitHub; use Net::GitHub::V3; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; sub new { diff --git a/lib/Net/GitHub/V3.pm b/lib/Net/GitHub/V3.pm index ff0f703..9c9756a 100644 --- a/lib/Net/GitHub/V3.pm +++ b/lib/Net/GitHub/V3.pm @@ -3,7 +3,7 @@ package Net::GitHub::V3; use Moo; use Types::Standard qw(InstanceOf); -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; with 'Net::GitHub::V3::Query'; diff --git a/lib/Net/GitHub/V3/Actions.pm b/lib/Net/GitHub/V3/Actions.pm index 4515677..a137bb5 100644 --- a/lib/Net/GitHub/V3/Actions.pm +++ b/lib/Net/GitHub/V3/Actions.pm @@ -2,7 +2,7 @@ package Net::GitHub::V3::Actions; use Moo; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; use Carp; diff --git a/lib/Net/GitHub/V3/Events.pm b/lib/Net/GitHub/V3/Events.pm index 71558d0..867ad3f 100644 --- a/lib/Net/GitHub/V3/Events.pm +++ b/lib/Net/GitHub/V3/Events.pm @@ -2,7 +2,7 @@ package Net::GitHub::V3::Events; use Moo; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; use URI::Escape; diff --git a/lib/Net/GitHub/V3/Gists.pm b/lib/Net/GitHub/V3/Gists.pm index 6b5c196..96e6634 100644 --- a/lib/Net/GitHub/V3/Gists.pm +++ b/lib/Net/GitHub/V3/Gists.pm @@ -2,7 +2,7 @@ package Net::GitHub::V3::Gists; use Moo; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; use URI::Escape; diff --git a/lib/Net/GitHub/V3/GitData.pm b/lib/Net/GitHub/V3/GitData.pm index b742ae4..dd9254f 100644 --- a/lib/Net/GitHub/V3/GitData.pm +++ b/lib/Net/GitHub/V3/GitData.pm @@ -2,7 +2,7 @@ package Net::GitHub::V3::GitData; use Moo; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; use URI::Escape; diff --git a/lib/Net/GitHub/V3/Gitignore.pm b/lib/Net/GitHub/V3/Gitignore.pm index b1c6e76..1a4784d 100644 --- a/lib/Net/GitHub/V3/Gitignore.pm +++ b/lib/Net/GitHub/V3/Gitignore.pm @@ -2,7 +2,7 @@ package Net::GitHub::V3::Gitignore; use Moo; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; use URI::Escape; diff --git a/lib/Net/GitHub/V3/Issues.pm b/lib/Net/GitHub/V3/Issues.pm index 7da91c3..3e4267d 100644 --- a/lib/Net/GitHub/V3/Issues.pm +++ b/lib/Net/GitHub/V3/Issues.pm @@ -2,7 +2,7 @@ package Net::GitHub::V3::Issues; use Moo; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; use URI::Escape; diff --git a/lib/Net/GitHub/V3/OAuth.pm b/lib/Net/GitHub/V3/OAuth.pm index c6c90b9..3916380 100644 --- a/lib/Net/GitHub/V3/OAuth.pm +++ b/lib/Net/GitHub/V3/OAuth.pm @@ -2,7 +2,7 @@ package Net::GitHub::V3::OAuth; use Moo; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; use URI::Escape; diff --git a/lib/Net/GitHub/V3/PullRequests.pm b/lib/Net/GitHub/V3/PullRequests.pm index 2c78e63..92c0459 100644 --- a/lib/Net/GitHub/V3/PullRequests.pm +++ b/lib/Net/GitHub/V3/PullRequests.pm @@ -2,7 +2,7 @@ package Net::GitHub::V3::PullRequests; use Moo; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; use URI; diff --git a/lib/Net/GitHub/V3/Query.pm b/lib/Net/GitHub/V3/Query.pm index f25041c..3326008 100644 --- a/lib/Net/GitHub/V3/Query.pm +++ b/lib/Net/GitHub/V3/Query.pm @@ -1,6 +1,6 @@ package Net::GitHub::V3::Query; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; use URI; diff --git a/lib/Net/GitHub/V3/Repos.pm b/lib/Net/GitHub/V3/Repos.pm index fb39359..df4136c 100644 --- a/lib/Net/GitHub/V3/Repos.pm +++ b/lib/Net/GitHub/V3/Repos.pm @@ -2,7 +2,7 @@ package Net::GitHub::V3::Repos; use Moo; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; use Carp; @@ -336,6 +336,10 @@ my %__methods = ( participation => { url => "/repos/%s/%s/stats/participation", method => 'GET'}, punch_card => { url => "/repos/%s/%s/stats/punch_card", method => 'GET'}, + # https://docs.github.com/en/rest/branches/branch-protection + branch_protection => { url => "/repos/%s/%s/branches/%s/protection", method => 'GET'}, + delete_branch_protection => { url => "/repos/%s/%s/branches/%s/protection", method => 'DELETE', check_status => 204 }, + update_branch_protection => { url => "/repos/%s/%s/branches/%s/protection", method => 'PUT', args => 1 }, ); __build_methods(__PACKAGE__, %__methods); @@ -996,6 +1000,43 @@ L<http://developer.github.com/v3/repos/statistics/> =back +=head3 Branch Protection API + +L<https://docs.github.com/en/rest/branches/branch-protection> + +=over 4 + +=item branch_protection + + my $protection = $repos->branch_protection('fayland', 'perl-net-github', 'master'); + +=item delete_branch_protection + + $repos->delete_branch_protection('fayland', 'perl-net-github', 'master'); + +=item update_branch_protection + + $repos->update_branch_protection('fayland', 'perl-net-github', 'master', { + allow_deletions => \0, + allow_force_pushes => \0, + block_creations => \1, + enforce_admins => \1, + required_conversation_resolution => \1, + required_linear_history => \0, + required_pull_request_reviews => { + dismiss_stale_reviews => \1, + require_code_owner_reviews => \1, + required_approving_review_count => 2, + }, + required_status_checks => { + strict => \1, + contexts => [] + }, + restrictions => undef, + }); + +=back + =head1 AUTHOR & COPYRIGHT & LICENSE Refer L<Net::GitHub> diff --git a/lib/Net/GitHub/V3/ResultSet.pm b/lib/Net/GitHub/V3/ResultSet.pm index 2aab104..617504c 100644 --- a/lib/Net/GitHub/V3/ResultSet.pm +++ b/lib/Net/GitHub/V3/ResultSet.pm @@ -1,6 +1,6 @@ package Net::GitHub::V3::ResultSet; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; use Types::Standard qw(Int Str ArrayRef Bool); diff --git a/lib/Net/GitHub/V3/Users.pm b/lib/Net/GitHub/V3/Users.pm index 23b8817..5147287 100644 --- a/lib/Net/GitHub/V3/Users.pm +++ b/lib/Net/GitHub/V3/Users.pm @@ -2,7 +2,7 @@ package Net::GitHub::V3::Users; use Moo; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; use URI::Escape; diff --git a/lib/Net/GitHub/V4.pm b/lib/Net/GitHub/V4.pm index 4cb93f7..7d8d025 100644 --- a/lib/Net/GitHub/V4.pm +++ b/lib/Net/GitHub/V4.pm @@ -2,7 +2,7 @@ package Net::GitHub::V4; use Moo; -our $VERSION = '1.03'; +our $VERSION = '1.05'; our $AUTHORITY = 'cpan:FAYLAND'; use URI; |