screwdriver-api 8.0.46 → 8.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-api",
3
- "version": "8.0.46",
3
+ "version": "8.0.47",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -47,7 +47,11 @@ function determineStartFrom(action, type, targetBranch, pipelineBranch, releaseN
47
47
  let startFrom;
48
48
 
49
49
  if (type && type === 'pr') {
50
- startFrom = '~pr';
50
+ if (action && action === 'closed') {
51
+ startFrom = '~pr-closed';
52
+ } else {
53
+ startFrom = '~pr';
54
+ }
51
55
  } else {
52
56
  switch (action) {
53
57
  case 'release':
@@ -890,7 +894,9 @@ async function pullRequestClosed(options, request, h) {
890
894
  j.permutations.length > 0 &&
891
895
  j.permutations[0] &&
892
896
  j.permutations[0].requires &&
893
- j.permutations[0].requires.includes('~pr-closed')
897
+ j.permutations[0].requires.some(
898
+ require => require === '~pr-closed' || require.startsWith('~pr-closed:')
899
+ )
894
900
  );
895
901
 
896
902
  prClosedJobs.push(...filteredJobs);