File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -115,14 +115,15 @@ const getCommentId = (
115115 return changesetBotComment ? changesetBotComment . id : null ;
116116 } ) ;
117117
118- const getChangesetId = (
119- changedFilesPromise : ReturnType < PRContext [ "github" ] [ "pulls" ] [ "listFiles" ] > ,
120- params : { repo : string ; owner : string ; pull_number : number }
118+ const hasChangesetBeenAdded = (
119+ changedFilesPromise : ReturnType < PRContext [ "github" ] [ "pulls" ] [ "listFiles" ] >
121120) =>
122121 changedFilesPromise . then ( ( files ) =>
123122 files . data . some (
124123 ( file ) =>
125- file . filename . startsWith ( ".changeset" ) && file . status === "added"
124+ file . status === "added" &&
125+ / ^ \. c h a n g e s e t \/ .+ \. m d $ / . test ( file . filename ) &&
126+ file . filename !== '.changeset/README.md'
126127 )
127128 ) ;
128129
@@ -169,7 +170,7 @@ export default (app: Application) => {
169170 context . payload . action === "synchronize"
170171 ? getCommentId ( context , { ...repo , issue_number : number } )
171172 : undefined ,
172- getChangesetId ( changedFilesPromise , { ... repo , pull_number : number } ) ,
173+ hasChangesetBeenAdded ( changedFilesPromise ) ,
173174 getChangedPackages ( {
174175 repo : context . payload . pull_request . head . repo . name ,
175176 owner : context . payload . pull_request . head . repo . owner . login ,
You can’t perform that action at this time.
0 commit comments