Commit 9aa2afb
authored
bin/orphaned-pr-environments: Handle no PR envs and merged PRs better (#889)
When there are no PR environments for an application, `grep 'pr-'` against the
workspace names will not match anything, in which case grep returns a code of
`1`. Since `-o pipefail` is set, `grep` returning `1` will fail the pipeline,
and since `-e` is set, the pipeline will fail the script. So catch a return of
`1` from `grep` and continue on.
Also handle merged PR statuses in addition to closed, as that will sometimes be
the case.
Also set a default for `GITHUB_STEP_SUMMARY` for when running the script
locally.1 parent c77cf60 commit 9aa2afb
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
31 | | - | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| |||
0 commit comments