.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Pithub::GitData::Commits 3pm" .TH Pithub::GitData::Commits 3pm "2021-02-15" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Pithub::GitData::Commits \- Github v3 Git Data Commits API .SH "VERSION" .IX Header "VERSION" version 0.01036 .SH "METHODS" .IX Header "METHODS" .SS "create" .IX Subsection "create" .IP "\(bu" 4 Create a Commit .Sp .Vb 1 \& POST /repos/:user/:repo/git/commits .Ve .Sp Parameters: .RS 4 .IP "\(bu" 4 \&\fBuser\fR: mandatory string .IP "\(bu" 4 \&\fBrepo\fR: mandatory string .IP "\(bu" 4 \&\fBdata\fR: mandatory hashref, having following keys: .RS 4 .IP "\(bu" 4 \&\fBmessage\fR: mandatory string, the commit message .IP "\(bu" 4 \&\fBtree\fR: mandatory string, the \s-1SHA\s0 of the tree object this commit points to .IP "\(bu" 4 \&\fBparents\fR: mandatory arrayref of the SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one \s-1SHA\s0 should be provided, for a merge commit, an array of more than one should be provided points to. .RE .RS 4 .Sp Optional Parameters in the \f(CW\*(C`data\*(C'\fR hashref: .Sp The committer section is optional and will be filled with the author data if omitted. If the author section is omitted, it will be filled in with the authenticated users information and the current date. .IP "\(bu" 4 \&\fBauthor\fR: hashref, having following keys: .RS 4 .IP "\(bu" 4 \&\fBname\fR: string of the name of the author of the commit .IP "\(bu" 4 \&\fBemail\fR: string of the email of the author of the commit .IP "\(bu" 4 \&\fBdate\fR: timestamp of when this commit was authored .RE .RS 4 .RE .IP "\(bu" 4 \&\fBcommitter\fR: hashref, having following keys: .RS 4 .IP "\(bu" 4 \&\fBname\fR: string of the name of the committer of the commit .IP "\(bu" 4 \&\fBemail\fR: string of the email of the committer of the commit .IP "\(bu" 4 \&\fBdate\fR: timestamp of when this commit was committed .RE .RS 4 .RE .RE .RS 4 .RE .RE .RS 4 .Sp Examples: .Sp .Vb 10 \& my $c = Pithub::GitData::Commits\->new; \& my $result = $c\->create( \& user => \*(Aqplu\*(Aq, \& repo => \*(AqPithub\*(Aq, \& data => { \& author => { \& date => \*(Aq2008\-07\-09T16:13:30+12:00\*(Aq, \& email => \*(Aqschacon@gmail.com\*(Aq, \& name => \*(AqScott Chacon\*(Aq, \& }, \& message => \*(Aqmy commit message\*(Aq, \& parents => [\*(Aq7d1b31e74ee336d15cbd21741bc88a537ed063a0\*(Aq], \& tree => \*(Aq827efc6d56897b048c772eb4087f854f46256132\*(Aq, \& } \& ); .Ve .Sp Response: \fBStatus: 201 Created\fR .Sp .Vb 10 \& { \& "sha": "7638417db6d59f3c431d3e1f261cc637155684cd", \& "url": "https://api.github.com/repos/octocat/Hello\-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd", \& "author": { \& "date": "2008\-07\-09T16:13:30+12:00", \& "name": "Scott Chacon", \& "email": "schacon@gmail.com" \& }, \& "committer": { \& "date": "2008\-07\-09T16:13:30+12:00", \& "name": "Scott Chacon", \& "email": "schacon@gmail.com" \& }, \& "message": "my commit message", \& "tree": { \& "url": "https://api.github.com/repos/octocat/Hello\-World/git/trees/827efc6d56897b048c772eb4087f854f46256132", \& "sha": "827efc6d56897b048c772eb4087f854f46256132" \& }, \& "parents": [ \& { \& "url": "https://api.github.com/repos/octocat/Hello\-World/git/commits/7d1b31e74ee336d15cbd21741bc88a537ed063a0", \& "sha": "7d1b31e74ee336d15cbd21741bc88a537ed063a0" \& } \& ] \& } .Ve .RE .SS "get" .IX Subsection "get" .IP "\(bu" 4 Get a Commit .Sp .Vb 1 \& GET /repos/:user/:repo/git/commits/:sha .Ve .Sp Parameters: .RS 4 .IP "\(bu" 4 \&\fBuser\fR: mandatory string .IP "\(bu" 4 \&\fBrepo\fR: mandatory string .IP "\(bu" 4 \&\fBsha\fR: mandatory string .RE .RS 4 .Sp Examples: .Sp .Vb 6 \& my $c = Pithub::GitData::Commits\->new; \& my $result = $c\->get( \& user => \*(Aqplu\*(Aq, \& repo => \*(AqPithub\*(Aq, \& sha => \*(Aqb7cdea6830e128bc16c2b75efd99842d971666e2\*(Aq, \& ); .Ve .Sp Response: \fBStatus: 200 \s-1OK\s0\fR .Sp .Vb 10 \& { \& "sha": "7638417db6d59f3c431d3e1f261cc637155684cd", \& "url": "https://api.github.com/repos/octocat/Hello\-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd", \& "author": { \& "date": "2010\-04\-10T14:10:01\-07:00", \& "name": "Scott Chacon", \& "email": "schacon@gmail.com" \& }, \& "committer": { \& "date": "2010\-04\-10T14:10:01\-07:00", \& "name": "Scott Chacon", \& "email": "schacon@gmail.com" \& }, \& "message": "added readme, because im a good github citizen\en", \& "tree": { \& "url": "https://api.github.com/repos/octocat/Hello\-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb", \& "sha": "691272480426f78a0138979dd3ce63b77f706feb" \& }, \& "parents": [ \& { \& "url": "https://api.github.com/repos/octocat/Hello\-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5", \& "sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5" \& } \& ] \& } .Ve .RE .SH "AUTHOR" .IX Header "AUTHOR" Johannes Plunien .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2011\-2019 by Johannes Plunien. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.