grim/youtrack-import
Clone
Summary
Browse
Changes
Graph
Split the version field into AffectedVersion and FixVersion while having trac and bitbucket use AffectedVersion. Also put the trac milestone into the Fix Version.
draft
2020-08-11, Gary Kramlich
faf8f5a4120f
Split the version field into AffectedVersion and FixVersion while having trac and bitbucket use AffectedVersion. Also put the trac milestone into the Fix Version.
package
youtrack
import
(
"fmt"
"net/http"
)
type
Transport
struct
{
Transport
http
.
RoundTripper
token
string
}
func
NewTransport
(
token
string
)
*
Transport
{
return
&
Transport
{
Transport
:
http
.
DefaultTransport
,
token
:
token
,
}
}
func
(
t
*
Transport
)
RoundTrip
(
req
*
http
.
Request
)
(
*
http
.
Response
,
error
)
{
req
.
Header
.
Set
(
"Authorization"
,
fmt
.
Sprintf
(
"Bearer %s"
,
t
.
token
))
return
t
.
Transport
.
RoundTrip
(
req
)
}