File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ var Commit = NodeGit.Commit;
44var LookupWrapper = NodeGit . Utils . lookupWrapper ;
55
66var _amend = Commit . prototype . amend ;
7+
78/**
89 * Retrieves the commit pointed to by the oid
910 * @async
@@ -162,6 +163,23 @@ Commit.prototype.getParents = function(limit, callback) {
162163 } , callback ) ;
163164} ;
164165
166+ /**
167+ * @typedef extractedSignature
168+ * @type {Object }
169+ * @property {String } signature the signature of the commit
170+ * @property {String } signedData the extracted signed data
171+ */
172+
173+ /**
174+ * Retrieve the signature and signed data for a commit.
175+ * @param {String } field Optional field to get from the signature,
176+ * defaults to gpgsig
177+ * @return {extractedSignature }
178+ */
179+ Commit . prototype . getSignature = function ( field ) {
180+ return Commit . extractSignature ( this . repo , this . id ( ) , field ) ;
181+ } ;
182+
165183/**
166184 * Get the tree associated with this commit.
167185 *
You can’t perform that action at this time.
0 commit comments