Skip to content

Commit

Permalink
Merge pull request #7 from Ry0taK/master
Browse files Browse the repository at this point in the history
Use environment variables
  • Loading branch information
martingjaldbaek authored Jul 29, 2021
2 parents eaf5b29 + e6889db commit e7bf745
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions combine-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
BRANCHES_TO_COMBINE: ${{ steps.fetch-branch-names.outputs.result }}
COMBINE_BRANCH_NAME: ${{ github.event.inputs.combineBranchName }}
run: |
echo "${{steps.fetch-branch-names.outputs.result}}"
echo "$BRANCHES_TO_COMBINE"
sourcebranches="${BRANCHES_TO_COMBINE%\"}"
sourcebranches="${sourcebranches#\"}"
Expand All @@ -124,10 +124,12 @@ jobs:
# Creates a PR with the new combined branch
- uses: actions/github-script@v3
name: Create Combined Pull Request
env:
PRS_STRING: ${{ steps.fetch-branch-names.outputs.prs-string }}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const prString = `${{ steps.fetch-branch-names.outputs.prs-string }}`;
const prString = process.env.PRS_STRING;
const body = 'This PR was created by the Combine PRs action by combining the following PRs:\n' + prString;
await github.pulls.create({
owner: context.repo.owner,
Expand Down

0 comments on commit e7bf745

Please sign in to comment.