Commit e3bceb7
authored
fix(project): stop creating duplicate hourly PRs in update cron jobs (#15318)
Because
* The update cron jobs were creating a new PR every hour even when the
tree content was identical, because the "skip if no changes" check
was broken
* git diff external-config origin/external-config fails with "unknown
revision" because remote branches aren't fetched by default
* The || fallback to git diff HEAD~1 always has content (we just
committed), so the check always passed
This commit
* Fetches the remote branch before comparing
* Only proceeds to close/recreate PR if the remote branch doesn't
exist yet OR the tree content differs
* Applies the same fix to the Firefox version updater script
Fixes #153171 parent 4787e3d commit e3bceb7
2 files changed
Lines changed: 16 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
54 | | - | |
55 | | - | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
104 | | - | |
105 | | - | |
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
0 commit comments