@rightkit/ci 0.3.11 → 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,13 @@ 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"',
|
|
2283
2290
|
// A manual run checks out only the dispatched ref: fetch the repository's default branch, with enough history for a merge-base.
|
|
2284
2291
|
" - name: Fetch the default branch for the gate's merge-base rules",
|
|
2285
2292
|
" if: github.event_name == 'workflow_dispatch'",
|
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
|