Skip to content

Commit

Permalink
find and replace repo url in issue
Browse files Browse the repository at this point in the history
testing
  • Loading branch information
hkershaw-brown authored Dec 27, 2023
1 parent 20a029f commit 25fdeae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/create_exercises.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ jobs:
issueFile: 'issues/${{ inputs.language }}-ex${{ matrix.exercise }}-issue.md'
if: hashFiles(env.issueFile) !=''
run: |
echo "BAR=$(gh issue create --title "${{ inputs.language }}: Exercise ${{ matrix.exercise }}" --body-file "issues/${{ inputs.language }}-ex${{ matrix.exercise }}-issue.md" --label ${{ inputs.language }})" >> $GITHUB_ENV
echo "REPO_URL=$(gh repo view --json url --jq '.url')" >> $GITHUB_ENV
echo ${{ env.REPO_URL }}
cat issues/${{ inputs.language }}-ex${{ matrix.exercise }}-issue.md > issuebody
sed -i 's/REPO_URL/${{ REPO_URL }}/g` issuebody
echo "BAR=$(gh issue create --title "${{ inputs.language }}: Exercise ${{ matrix.exercise }}" --body-file issuebody --label ${{ inputs.language }})" >> $GITHUB_ENV
- name: query_branch_exists
run: |
echo "FOO=$(git branch -r | grep "${{ inputs.language }}-${{ matrix.exercise }}")" >> $GITHUB_ENV
Expand All @@ -52,10 +56,6 @@ jobs:
if [ '${{ env.FOO }}' == '' ]; then
echo "no branch ${{ inputs.language }}-${{ matrix.exercise }} to create pull request from"
else
echo ${{ github.event.repository.name }}
echo "REPO_URL=$(gh repo view --json url --jq '.url')" >> $GITHUB_ENV
gh repo view --json url --jq '.url'
echo ${{ env.REPO_URL }}
cat pull_requests/${{ inputs.language }}-ex${{ matrix.exercise }}-pullbody.md > pullbody
echo "Fixes ${{ env.BAR }} ${{ inputs.language }}" >> pullbody
gh pr create -B main -H "${{ inputs.language }}-${{ matrix.exercise }}" --title 'Exercise ${{ matrix.exercise }} ${{ inputs.language }}.' --body-file pullbody --label ${{ inputs.language }}
Expand Down

0 comments on commit 25fdeae

Please sign in to comment.