Commit 747517a
feat: Allow updater to target non-default branches (#118)
* feat: allow updater to target non-default branches
Add support for `target-branch` input parameter to allow dependency
updates on branches other than the repository's default branch.
This enables updating alpha, beta, or version-specific branches.
- Add `target-branch` input parameter to action.yml
- Modify base branch detection to use target-branch when provided
- Update README with parameter documentation and usage example
- Add workflow test for target-branch functionality
Fixes #87
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* docs: clarify limitations for updating dependencies on non-default branches
* docs: add changelog entry for target-branch feature
* fix: use existing branch for target-branch test
The test was failing because 'test-branch' doesn't exist in this repository.
Changed to use the existing 'test/nonbot-commits' branch instead.
* fix: checkout target branch before making changes
The previous implementation was creating PRs with the entire diff between
the default branch and target branch. Now we properly checkout the target
branch first, then make dependency updates on top of it.
This ensures PRs only contain the dependency changes, not all differences
between branches.
* refactor: use actions/checkout ref parameter instead of separate git commands
Much cleaner approach using the built-in ref parameter of actions/checkout
to directly checkout the target branch instead of manual git commands.
Uses: ref: ${{ inputs.target-branch || github.ref }}
- If target-branch is provided, checkout that branch
- Otherwise, use the default behavior (github.ref)
* refactor: update checkout paths in workflow tests and remove redundant checkout step in updater action
* fix: correct paths for checkout and updater action in workflow tests
* fix: set working directory to caller-repo for all relevant steps in the updater action
* roll back workflow-test changes
* fix: update working directory path for create-pull-request action
* fix: prepend main branch name to PR branch for better organization
* fix: prepend PR branch prefix to generated branch name based on strategy
* fix: update expected PR branch format in validation step
---------
Co-authored-by: Claude <[email protected]>1 parent de9e3fa commit 747517a
File tree
4 files changed
+112
-8
lines changed- .github/workflows
- updater
4 files changed
+112
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 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 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
76 | 140 | | |
77 | 141 | | |
78 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
85 | 98 | | |
86 | 99 | | |
87 | 100 | | |
| |||
118 | 131 | | |
119 | 132 | | |
120 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
121 | 138 | | |
122 | 139 | | |
123 | 140 | | |
| |||
139 | 156 | | |
140 | 157 | | |
141 | 158 | | |
142 | | - | |
| 159 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| |||
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
| 106 | + | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| 128 | + | |
125 | 129 | | |
126 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
127 | 137 | | |
128 | 138 | | |
129 | 139 | | |
130 | 140 | | |
131 | 141 | | |
132 | 142 | | |
| 143 | + | |
133 | 144 | | |
134 | 145 | | |
135 | 146 | | |
| |||
144 | 155 | | |
145 | 156 | | |
146 | 157 | | |
| 158 | + | |
| 159 | + | |
147 | 160 | | |
148 | 161 | | |
149 | | - | |
150 | 162 | | |
151 | 163 | | |
152 | 164 | | |
| |||
165 | 177 | | |
166 | 178 | | |
167 | 179 | | |
| 180 | + | |
168 | 181 | | |
169 | 182 | | |
170 | 183 | | |
171 | 184 | | |
172 | 185 | | |
| 186 | + | |
173 | 187 | | |
174 | 188 | | |
175 | 189 | | |
| |||
188 | 202 | | |
189 | 203 | | |
190 | 204 | | |
| 205 | + | |
191 | 206 | | |
192 | 207 | | |
193 | 208 | | |
| |||
204 | 219 | | |
205 | 220 | | |
206 | 221 | | |
| 222 | + | |
207 | 223 | | |
208 | 224 | | |
209 | 225 | | |
| |||
225 | 241 | | |
226 | 242 | | |
227 | 243 | | |
| 244 | + | |
| 245 | + | |
228 | 246 | | |
229 | 247 | | |
230 | 248 | | |
231 | 249 | | |
| 250 | + | |
232 | 251 | | |
233 | 252 | | |
234 | 253 | | |
| |||
237 | 256 | | |
238 | 257 | | |
239 | 258 | | |
| 259 | + | |
240 | 260 | | |
241 | 261 | | |
242 | 262 | | |
| |||
254 | 274 | | |
255 | 275 | | |
256 | 276 | | |
| 277 | + | |
257 | 278 | | |
258 | 279 | | |
259 | 280 | | |
| |||
265 | 286 | | |
266 | 287 | | |
267 | 288 | | |
| 289 | + | |
268 | 290 | | |
269 | 291 | | |
270 | 292 | | |
| |||
0 commit comments