forge
Clone
https://git.tahinli.com/Tahinli/forge.git
0 watching0 forksRustAGPL-3.07.1 MiB490f099Tahinli7 hours ago322 commits
| 1 | //! Auto-merge: a pull request with auto-merge enabled merges by itself, as the user who enabled |
| 2 | //! it, the moment its merge gate passes. |
| 3 | //! |
| 4 | //! The gate (`pulls_merge::merge_gate`) is re-evaluated whenever something that can clear it |
| 5 | //! arrives: a commit status (the token API, CI job completion) or a review. A new push to the head |
| 6 | //! branch disables auto-merge (see `pulls_sync`). Nothing here polls; every call is a reaction to |
| 7 | //! an event. |
| 8 | |
| 9 | use ; |
| 10 | |
| 11 | use crate; |
| 12 | use crateAppState; |
| 13 | |
| 14 | /// Re-evaluates every open pull request of `repo_id` that has auto-merge on and whose head is |
| 15 | /// `sha`. Called after a commit status for `sha` was written. Failures are logged: the status |
| 16 | /// that triggered this has already been stored. |
| 17 | pub async |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | /// Re-evaluates one pull request, reloaded from the store. Called after a review arrived. |
| 43 | pub async |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | async |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | /// Merges `pr` when auto-merge is on and nothing blocks it any more. Returns whether it merged. |
| 62 | /// |
| 63 | /// The merge runs as the user who enabled auto-merge, and only while that user still has Write on |
| 64 | /// the repo; otherwise auto-merge is switched off with a timeline notice. A merge the repository |
| 65 | /// refuses (a conflict, a moved base) also switches it off, so it never retries forever. |
| 66 | pub async |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 |