Skip to content

Commit

Permalink
fix body
Browse files Browse the repository at this point in the history
Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla committed Sep 27, 2023
1 parent a2054d7 commit a80ee92
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/cypress_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,24 +115,18 @@ jobs:
id: get_pr_info
uses: actions/github-script@v6
with:
result-encoding: string
script: |
const { data: pr } = await github.rest.pulls.get({
await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: "${{ inputs.pr_number }}"
pull_number: ${{ inputs.pr_number }}
});
const sourceRepo = pr.head.repo.full_name;
const sourceBranch = pr.head.ref;
const sourceJSON = `{ 'source': { 'repo': '${sourceRepo}', 'branch': '${sourceBranch}' } }`;
return sourceJSON;
- name: Set source branch from PR number
if: ${{ github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }}
run: |
echo "SOURCE_REPO=${{ fromJSON(steps.get_pr_info.outputs.result.source.repo) }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH=${{ fromJSON(steps.get_pr_info.outputs.result.source.branch) }}" >> $GITHUB_ENV
echo "SOURCE_REPO=${{ steps.get_pr_info.outputs.result.head.repo.full_name }}" >> $GITHUB_ENV
echo "SOURCE_BRANCH=${{ steps.get_pr_info.outputs.result.head.ref }}" >> $GITHUB_ENV
- run: |
echo "Source repo: ${{ env.SOURCE_REPO }}"
Expand Down

0 comments on commit a80ee92

Please sign in to comment.