mirror of
https://github.com/documize/community.git
synced 2025-08-09 07:25:23 +02:00
commented-out version of TokenOK code
This commit is contained in:
parent
74b08d2dfc
commit
41884a814d
1 changed files with 20 additions and 2 deletions
|
@ -17,6 +17,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/documize/community/wordsmith/log"
|
"github.com/documize/community/wordsmith/log"
|
||||||
|
//gogithub "github.com/google/go-github/github"
|
||||||
)
|
)
|
||||||
|
|
||||||
const tagIssuesData = "issues_data"
|
const tagIssuesData = "issues_data"
|
||||||
|
@ -218,8 +219,9 @@ type githubIssueActivity struct {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
type githubConfig struct {
|
type githubConfig struct {
|
||||||
AppKey string `json:"appKey"` // TODO keep?
|
AppKey string `json:"appKey"` // TODO keep?
|
||||||
Token string `json:"token"`
|
Token string `json:"token"`
|
||||||
|
//TokenOK bool `json:"tokenOK,omitempty"`
|
||||||
Owner string `json:"owner_name"`
|
Owner string `json:"owner_name"`
|
||||||
Repo string `json:"repo_name"`
|
Repo string `json:"repo_name"`
|
||||||
Branch string `json:"branch"`
|
Branch string `json:"branch"`
|
||||||
|
@ -263,6 +265,22 @@ func (c *githubConfig) Clean() {
|
||||||
c.SincePtr = &since
|
c.SincePtr = &since
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
authClient := gogithub.NewClient((&gogithub.BasicAuthTransport{
|
||||||
|
Username: clientID(),
|
||||||
|
Password: clientSecret(),
|
||||||
|
}).Client())
|
||||||
|
|
||||||
|
auth, _, err := authClient.Authorizations.Check(clientID(), c.Token)
|
||||||
|
if err == nil {
|
||||||
|
//fmt.Printf("DEBUG auth %#v\n", *auth)
|
||||||
|
c.TokenOK = true
|
||||||
|
} else {
|
||||||
|
//fmt.Println("DEBUG auth err", err)
|
||||||
|
c.TokenOK = false
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
type githubCallbackT struct {
|
type githubCallbackT struct {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue