Skip to content

Setting up your repository settings

Candace Savonen edited this page Dec 20, 2021 · 28 revisions

Setting up your repository settings

Recommended repository settings:

With your course repository set up, there are some settings recommended for development.

Using the issue guide checklist called New Course - Set Repository Settings, you can walk through the steps for setting up your repository as we would recommend.

Next issues checklist for repository settings

Set up GitHub pages

Go to Settings > Pages.

Find pages settings

Change pages settings

  • Under Source, pick the drop down menu and pick main and /docs.
  • Then click Save.
  • Lastly, check the box that says Enforce HTTPS at the bottom of this page.

Enforce HTTPS

Set up branches

Go to Settings > Branches and click Add rule. This is only possible if you have GitHub Pro, Team, or Enterprise access. We recommend seeing if your organization can give you access if you do not already have access. To get this access through your organization, you will need to transfer ownership of your repo to your organization. See here about how to do this.

Add branch rule

For Branch name pattern, put main.

Put main for branch name pattern

Protect the main branch:
Then check the box that says Require pull requests before merging.

Make sure branches are updated:

  • Check the box that says Require status checks to pass before merging.
  • Underneath this also check the box that says Require branches to be up to date before merging.

Branch settings

After setting up these new branch items, click Create and Save changes.

After you submit a pull request if you haven't already done so, you will see several automatic checks happening. Don't be alarmed if this image looks slightly different as we make updates to the template:

Automatic updates

These checks will do important things like:

  • check that the all the urls actually take learners somewhere
  • check that the code is styled using the styler package
  • check that the spelling is correct using the spelling package
  • create previews of the rendered versions of the course

See the Github Actions page for more details on these.

If you are a part of JHU DaSL then you can skip the next section and the issue about GitHub secrets and start adding more content!

Otherwise, you will need to do the next section to set up Git Secrets.

There is one more issue that you can do to get updates for template files. one more issue

We recommend that you do this but it is optional.

one more issue

See this section to learn more about this or continue following along with the guide which will tell you how to set this up in a bit.

Note that you can comment and close the issues you finish if you click on the issue and scroll down to the comment field to add comments and click the close issue button if you are finished.

Clone this wiki locally