summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-23 11:00:33 -0600
committerJeff Carr <[email protected]>2024-02-23 11:00:33 -0600
commit28a20e09220d5191f8920d7bd78c961ae9cd05e0 (patch)
treee6b294e8e6a3743188a79e1cdd93c5cb43eec04a /common.go
parent5268267408166a8b6d80ada8231399d657a21243 (diff)
add repo.IsPrivate()v0.20.10
Diffstat (limited to 'common.go')
-rw-r--r--common.go41
1 files changed, 11 insertions, 30 deletions
diff --git a/common.go b/common.go
index cbf798c..8cfed10 100644
--- a/common.go
+++ b/common.go
@@ -3,7 +3,6 @@ package repostatus
import (
"strings"
- "go.wit.com/gui"
"go.wit.com/log"
// "go.wit.com/gui/gui"
)
@@ -178,35 +177,17 @@ func (rs *RepoStatus) SetTargetVersion(s string) {
rs.targetReleaseVersion.SetText(s)
}
-// returns a widget of the last tag that acts as a mirror
-func (rs *RepoStatus) MirrorLastTag() *gui.Node {
- return rs.lasttag.MirrorValue()
-}
-
-func (rs *RepoStatus) MirrorTargetVersion() *gui.Node {
- return rs.targetReleaseVersion.MirrorValue()
-}
-
-func (rs *RepoStatus) MirrorCurrentVersion() *gui.Node {
- return rs.currentVersion.MirrorValue()
-}
-
-func (rs *RepoStatus) MirrorCurrentName() *gui.Node {
- return rs.currentBranch.MirrorValue()
-}
-
-func (rs *RepoStatus) MirrorGitState() *gui.Node {
- return rs.gitState.MirrorValue()
-}
-
-func (rs *RepoStatus) MirrorMasterVersion() *gui.Node {
- return rs.mainBranchVersion.MirrorValue()
-}
-
-func (rs *RepoStatus) MirrorDevelVersion() *gui.Node {
- return rs.develBranchVersion.MirrorValue()
+func (rs *RepoStatus) IsPrivate() bool {
+ if rs.private.String() == "true" {
+ return true
+ }
+ return false
}
-func (rs *RepoStatus) MirrorUserVersion() *gui.Node {
- return rs.userBranchVersion.MirrorValue()
+func (rs *RepoStatus) SetPrivate(b bool) {
+ if b {
+ rs.private.SetText("true")
+ } else {
+ rs.private.SetText("false")
+ }
}