File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,10 @@ type cliConfig struct {
40
40
}
41
41
42
42
var (
43
- integration = os .Getenv ("INTEGRATION" )
44
- env = os .Getenv ("ENV" )
45
- scope = os .Getenv ("SCOPE" )
43
+ integration = os .Getenv ("INTEGRATION" )
44
+ env = os .Getenv ("ENV" )
45
+ scope = os .Getenv ("SCOPE" )
46
+ optionalScope = os .Getenv ("OPTIONAL_SCOPE" )
46
47
)
47
48
48
49
func main () {
@@ -100,6 +101,9 @@ func main() {
100
101
if scope != "" {
101
102
q .Set ("scope" , scope )
102
103
}
104
+ if optionalScope != "" {
105
+ q .Set ("optional_scope" , optionalScope )
106
+ }
103
107
u .RawQuery = q .Encode ()
104
108
105
109
req , err := http .NewRequest ("GET" , u .String (), nil )
@@ -179,6 +183,9 @@ func main() {
179
183
if scope != "" {
180
184
q .Set ("scope" , scope )
181
185
}
186
+ if optionalScope != "" {
187
+ q .Set ("optional_scope" , optionalScope )
188
+ }
182
189
u .RawQuery = q .Encode ()
183
190
184
191
gs , err := gptscript .NewGPTScript (gptscript.GlobalOptions {})
Original file line number Diff line number Diff line change @@ -2,5 +2,6 @@ Name: oauth2
2
2
Param: integration: Name of the integration to use
3
3
Param: env: Name of the environment variable to set with the token
4
4
Param: scope: Space-separated list of scopes to request
5
+ Param: optional_scope: (optional) Space-separated list of scopes to request (HubSpot-specific)
5
6
6
7
#!${GPTSCRIP T_TO OL_DIR }/bin/gptscript-go-tool
You can’t perform that action at this time.
0 commit comments