@rightkit/ci 0.3.10 → 0.3.12
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/manifest.mjs
CHANGED
|
@@ -2280,6 +2280,20 @@ export function checkJob(manifest, lane = "ci") {
|
|
|
2280
2280
|
" if: github.event_name == 'pull_request'",
|
|
2281
2281
|
" shell: bash",
|
|
2282
2282
|
` run: git update-ref "refs/remotes/origin/${manifest.defaultBranch ?? "main"}" "$(git rev-parse --verify 'HEAD^1^{commit}')"`,
|
|
2283
|
+
// right-release refuses a detached HEAD: attach the merge commit to a local branch named for the pull request's head.
|
|
2284
|
+
" - name: Attach the pull request checkout to a branch for right-release",
|
|
2285
|
+
" if: github.event_name == 'pull_request'",
|
|
2286
|
+
" shell: bash",
|
|
2287
|
+
" env:",
|
|
2288
|
+
" RIGHT_GIT_PR_HEAD: ${{ github.head_ref }}",
|
|
2289
|
+
' run: git switch -C "$RIGHT_GIT_PR_HEAD"',
|
|
2290
|
+
// A manual run checks out only the dispatched ref: fetch the repository's default branch, with enough history for a merge-base.
|
|
2291
|
+
" - name: Fetch the default branch for the gate's merge-base rules",
|
|
2292
|
+
" if: github.event_name == 'workflow_dispatch'",
|
|
2293
|
+
" shell: bash",
|
|
2294
|
+
" env:",
|
|
2295
|
+
" RIGHT_GIT_REPO_DEFAULT: ${{ github.event.repository.default_branch }}",
|
|
2296
|
+
` run: git fetch --no-tags --unshallow origin "+refs/heads/$RIGHT_GIT_REPO_DEFAULT:refs/remotes/origin/${manifest.defaultBranch ?? "main"}"`,
|
|
2283
2297
|
] : []),
|
|
2284
2298
|
` - uses: ${pins.setupNode}`,
|
|
2285
2299
|
" with:",
|
package/package.json
CHANGED
|
@@ -33,6 +33,12 @@ ${CI_JOB_CONCURRENCY} steps:
|
|
|
33
33
|
if: github.event_name == 'pull_request'
|
|
34
34
|
shell: bash
|
|
35
35
|
run: git update-ref "refs/remotes/origin/${DEFAULT_BRANCH}" "$(git rev-parse --verify 'HEAD^1^{commit}')"
|
|
36
|
+
- name: Attach the pull request checkout to a branch for right-release
|
|
37
|
+
if: github.event_name == 'pull_request'
|
|
38
|
+
shell: bash
|
|
39
|
+
env:
|
|
40
|
+
RIGHT_GIT_PR_HEAD: ${{ github.head_ref }}
|
|
41
|
+
run: git switch -C "$RIGHT_GIT_PR_HEAD"
|
|
36
42
|
- name: Restore last green commit marker
|
|
37
43
|
if: github.event_name != 'pull_request'
|
|
38
44
|
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|