add test for implicit creation of a fork in an organization

This commit is contained in:
Earl Warren 2023-11-01 17:03:35 +01:00
parent 26490da8d2
commit 84c7b12c83
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
4 changed files with 72 additions and 5 deletions

View file

@ -0,0 +1,26 @@
# SPDX-License-Identifier: MIT
name: test
on:
pull_request_target:
types:
- opened
- synchronize
- closed
jobs:
test:
runs-on: docker
steps:
- uses: actions/checkout@v4
- uses: SELF@vTest
with:
origin-url: ${{ env.GITHUB_SERVER_URL }}
origin-repo: user1/origin-organization-fork-destination
origin-token: ${{ secrets.ORIGIN_TOKEN }}
origin-pr: ${{ github.event.pull_request.number }}
destination-url: ${{ env.GITHUB_SERVER_URL }}
destination-repo: user2/destinationrepo
destination-fork-repo: destination-fork/destinationrepo
destination-branch: main
destination-token: ${{ secrets.DESTINATION_TOKEN }}
update: ./upgraded
debug: true

View file

@ -0,0 +1 @@
originrepo

View file

@ -0,0 +1,14 @@
#!/bin/bash
set -ex
destination_checkout="$1"
destination_pr_json="$2"
origin_checkout="$3"
origin_pr_json="$4"
test -d $destination_checkout
test -d $origin_checkout
test -f $origin_pr_json
date +%s > $destination_checkout/last