File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,11 @@ module.exports = async (pluginConfig, context) => {
54
54
const upload = {
55
55
url : uploadUrl ,
56
56
file : await readFile ( resolve ( cwd , filePath ) ) ,
57
- contentType : mime . getType ( extname ( fileName ) ) || 'text/plain' ,
58
- contentLength : file . size ,
59
57
name : fileName ,
58
+ headers : {
59
+ 'content-type' : mime . getType ( extname ( fileName ) ) || 'text/plain' ,
60
+ 'content-length' : file . size ,
61
+ } ,
60
62
} ;
61
63
62
64
debug ( 'file path: %o' , filePath ) ;
@@ -68,7 +70,7 @@ module.exports = async (pluginConfig, context) => {
68
70
69
71
const {
70
72
data : { browser_download_url : downloadUrl } ,
71
- } = await github . repos . uploadAsset ( upload ) ;
73
+ } = await github . repos . uploadReleaseAsset ( upload ) ;
72
74
logger . log ( 'Published file %s' , downloadUrl ) ;
73
75
} )
74
76
) ;
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ module.exports = async (pluginConfig, context) => {
51
51
const prs = await pFilter (
52
52
uniqBy ( flatten ( await Promise . all ( searchQueries ) ) , 'number' ) ,
53
53
async ( { number} ) =>
54
- ( await github . pullRequests . getCommits ( { owner, repo, number} ) ) . data . find ( ( { sha} ) => shas . includes ( sha ) ) ||
54
+ ( await github . pullRequests . listCommits ( { owner, repo, number} ) ) . data . find ( ( { sha} ) => shas . includes ( sha ) ) ||
55
55
shas . includes ( ( await github . pullRequests . get ( { owner, repo, number} ) ) . data . merge_commit_sha )
56
56
) ;
57
57
@@ -121,7 +121,7 @@ module.exports = async (pluginConfig, context) => {
121
121
debug ( 'closing issue: %O' , updateIssue ) ;
122
122
const {
123
123
data : { html_url : url } ,
124
- } = await github . issues . edit ( updateIssue ) ;
124
+ } = await github . issues . update ( updateIssue ) ;
125
125
logger . log ( 'Closed issue #%d: %s.' , issue . number , url ) ;
126
126
} catch ( error ) {
127
127
errors . push ( error ) ;
You can’t perform that action at this time.
0 commit comments