File tree Expand file tree Collapse file tree 4 files changed +16
-2
lines changed Expand file tree Collapse file tree 4 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ inputs:
15
15
description : |
16
16
The path for the sync configuration file
17
17
required : false
18
+ IS_FINE_GRAINED :
19
+ description : |
20
+ Label GH_PAT as a fine grained token
21
+ required : false
18
22
PR_LABELS :
19
23
description : |
20
24
Labels which will be added to the pull request. Defaults to sync. Set to false to turn off
Original file line number Diff line number Diff line change @@ -29830,6 +29830,10 @@ try {
29830
29830
key: 'CONFIG_PATH',
29831
29831
default: '.github/sync.yml'
29832
29832
}),
29833
+ IS_FINE_GRAINED: getInput({
29834
+ key: 'IS_FINE_GRAINED',
29835
+ default: false
29836
+ }),
29833
29837
COMMIT_BODY: getInput({
29834
29838
key: 'COMMIT_BODY',
29835
29839
default: ''
@@ -30053,6 +30057,7 @@ const fs = __nccwpck_require__(7147)
30053
30057
const {
30054
30058
GITHUB_TOKEN,
30055
30059
IS_INSTALLATION_TOKEN,
30060
+ IS_FINE_GRAINED,
30056
30061
GIT_USERNAME,
30057
30062
GIT_EMAIL,
30058
30063
TMP_DIR,
@@ -30100,7 +30105,7 @@ class Git {
30100
30105
// Set values to current repo
30101
30106
this.repo = repo
30102
30107
this.workingDir = path.join(TMP_DIR, repo.uniqueName)
30103
- this.gitUrl = `https://${ IS_INSTALLATION_TOKEN ? 'x-access-token:' : '' }${ GITHUB_TOKEN }@${ repo.fullName }.git`
30108
+ this.gitUrl = `https://${ IS_INSTALLATION_TOKEN ? 'x-access-token:' : '' }${ IS_FINE_GRAINED ? 'oauth:' : '' }${ GITHUB_TOKEN }@${ repo.fullName }.git`
30104
30109
30105
30110
await this.clone()
30106
30111
await this.setIdentity()
Original file line number Diff line number Diff line change 41
41
key : 'CONFIG_PATH' ,
42
42
default : '.github/sync.yml'
43
43
} ) ,
44
+ IS_FINE_GRAINED : getInput ( {
45
+ key : 'IS_FINE_GRAINED' ,
46
+ default : false
47
+ } ) ,
44
48
COMMIT_BODY : getInput ( {
45
49
key : 'COMMIT_BODY' ,
46
50
default : ''
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ const fs = require('fs')
9
9
const {
10
10
GITHUB_TOKEN ,
11
11
IS_INSTALLATION_TOKEN ,
12
+ IS_FINE_GRAINED ,
12
13
GIT_USERNAME ,
13
14
GIT_EMAIL ,
14
15
TMP_DIR ,
@@ -56,7 +57,7 @@ class Git {
56
57
// Set values to current repo
57
58
this . repo = repo
58
59
this . workingDir = path . join ( TMP_DIR , repo . uniqueName )
59
- this . gitUrl = `https://${ IS_INSTALLATION_TOKEN ? 'x-access-token:' : '' } ${ GITHUB_TOKEN } @${ repo . fullName } .git`
60
+ this . gitUrl = `https://${ IS_INSTALLATION_TOKEN ? 'x-access-token:' : '' } ${ IS_FINE_GRAINED ? 'oauth:' : '' } ${ GITHUB_TOKEN } @${ repo . fullName } .git`
60
61
61
62
await this . clone ( )
62
63
await this . setIdentity ( )
You can’t perform that action at this time.
0 commit comments