Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo fork pull request adjustments #399

Merged
merged 2 commits into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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