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 = (
115
115
return changesetBotComment ? changesetBotComment . id : null ;
116
116
} ) ;
117
117
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" ] >
121
120
) =>
122
121
changedFilesPromise . then ( ( files ) =>
123
122
files . data . some (
124
123
( 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'
126
127
)
127
128
) ;
128
129
@@ -169,7 +170,7 @@ export default (app: Application) => {
169
170
context . payload . action === "synchronize"
170
171
? getCommentId ( context , { ...repo , issue_number : number } )
171
172
: undefined ,
172
- getChangesetId ( changedFilesPromise , { ... repo , pull_number : number } ) ,
173
+ hasChangesetBeenAdded ( changedFilesPromise ) ,
173
174
getChangedPackages ( {
174
175
repo : context . payload . pull_request . head . repo . name ,
175
176
owner : context . payload . pull_request . head . repo . owner . login ,
You can’t perform that action at this time.
0 commit comments