Skip to content

Commit

Permalink
[skip ci] avoids templating of pr body in oss pr migrate github action
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptnull committed Nov 27, 2020
1 parent d8e8b47 commit 748ab71
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/migrate-hge-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ jobs:
core.setOutput('ossPrBaseSha', pr.data.base.sha);
core.setOutput('ossPrTitle', pr.data.title);
core.setOutput('ossPrUrl', pr.data.html_url);
core.setOutput('ossPrBody', pr.data.body);
const fs = require('fs');
fs.writeFileSync('pr-body.txt', pr.data.body);
- name: Get all authors of the pull request
uses: actions/github-script@v3
Expand Down Expand Up @@ -148,13 +150,15 @@ jobs:
with:
github-token: ${{secrets.HASURA_BOT_GH_TOKEN}}
script: |
const fs = require('fs');
const prBody = fs.readFileSync('pr-body.txt', 'utf-8');
const pr = await github.pulls.create({
owner: 'hasura',
repo: 'graphql-engine-mono',
head: 'oss_pr_refs/pull/${{ github.event.inputs.ossPrNumber }}/head',
base: 'main',
title: '${{ steps.pr.outputs.ossPrTitle }}',
body: `This PR was migrated from ${{ steps.pr.outputs.ossPrUrl }} \n\n---\n${{ steps.pr.outputs.ossPrBody }}`
body: `This PR was migrated from ${{ steps.pr.outputs.ossPrUrl }} \n\n---\n` + prBody
});
console.log('Migrated PR in graphql-engine-mono = ', pr.data.html_url);

0 comments on commit 748ab71

Please sign in to comment.