Added the wrap() method for a backpointer

This commit is contained in:
Kohsuke Kawaguchi
2016-08-05 20:40:23 -07:00
parent 0cf4211aa5
commit 80aa75aab1
2 changed files with 6 additions and 0 deletions

View File

@@ -14,6 +14,8 @@ class GHContentWithLicense extends GHContent {
@Override
GHContentWithLicense wrap(GHRepository owner) {
super.wrap(owner);
if (license!=null)
license.wrap(owner.root);
return this;
}
}

View File

@@ -158,4 +158,8 @@ public class GHLicense extends GHObject {
return url.hashCode();
}
/*package*/ GHLicense wrap(GitHub root) {
this.root = root;
return this;
}
}