Skip to content

Commit

Permalink
Undo fork pull request adjustments (#399)
Browse files Browse the repository at this point in the history
* Revert "Try to adjust for if its a forked PR (#394)"

This reverts commit d7bd6a5.

* Revert "One more adjustment for forks (#396)"

This reverts commit b66ca23.
  • Loading branch information
cansavvy authored Jan 14, 2022
1 parent e63bde2 commit f848e35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/render-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ jobs:
rm -r docs/*
# Add remote if this is a fork
- name: Add remote if its a fork
if: github.event.repository.name == 'OTTR_Template'
run: |
org_name=$(dirname ${{github.repository}})
echo ::set-output name=org_name::$org_name
echo $org_name
git remote add $org_name https://github.com/$org_name/OTTR_Template
git fetch $org_name
# Run bookdown rendering
- name: Run bookdown render
id: bookdown
Expand Down Expand Up @@ -82,9 +71,8 @@ jobs:
echo Coursera status ${{steps.coursera.outcome}}
exit 1
# Commit the rendered bookdown files if this isn't to the OTTR Template
- name: Commit rendered bookdown
if: github.event.repository.name != 'OTTR_Template'
# Commit the rendered bookdown files
- name: Commit rendered bookdown files to preview branch
id: commit
run: |
changes=$(git diff --name-only `git log --format="%H" -n 1 origin/main` -- docs)
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/style-and-sp-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ on:
pull_request:
branches: [ main ]

permissions: write-all

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "style and check"
Expand Down Expand Up @@ -43,25 +41,12 @@ jobs:
name: spell-check-results
path: resources/spell_check_results.tsv

# Add remote if this is a fork
- name: Add remote if its a fork
if: github.event.repository.name == 'OTTR_Template'
run: |
org_name=$(dirname ${{github.repository}})
echo ::set-output name=org_name::$org_name
echo $org_name
git remote add $org_name https://github.com/$org_name/OTTR_Template
git fetch $org_name
- name: Spell check errors
run: |
# Get on the preview branch if it exists. If it doesn't create it.
branch_name='preview-${{ github.event.pull_request.number }}'
git rev-parse --quiet --verify $branch_name >/dev/null && exists=true || exists=false
git remote add jhudsl git@github.com:jhudsl/OTTR_Template.git
if [[ $exists == true ]];
then
git checkout $branch_name
Expand Down

0 comments on commit f848e35

Please sign in to comment.