docs icon indicating copy to clipboard operation
docs copied to clipboard

GitHub Actions docs: inconsistency of YAML indentation between dashes

Open justanotheranonymoususer opened this issue 6 years ago • 3 comments

See this question: https://stackoverflow.com/questions/17014460/yaml-indentation-for-array-in-hash

The docs are not consistent regarding YAML indentation between dashes.

Example: Using Flake8 to lint code:

steps:
- uses: actions/checkout@v2
- name: Set up Python
  uses: actions/setup-python@v2
  with:
    python-version: '3.x'
...

Running tests with tox:

    steps:
      - uses: actions/checkout@v2
      - name: Setup Python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python }}
...

There are many other examples of inconsistency, between different snippets and sometimes within a single snippet. That's confusing, I suggest to agree on a convention and stick to it.

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

welcome[bot] avatar Nov 22 '20 13:11 welcome[bot]

Thanks for opening an issue @justanotheranonymoususer! I'll triage this for someone on the team to take a look at 👀

janiceilene avatar Nov 23 '20 16:11 janiceilene

Thanks for surfacing this @justanotheranonymoususer! ⚡ Sorry for the slow response over the US holiday. It looks like both formats are valid, but we agree that it's best to standardize on one. The GitHub workflow editor's default is to indent the list, so we'll follow that convention - I've added it to the content style guide here.

I'm leaving this issue open so that we can also fix instances of the problem that we find.

emilyistoofunky avatar Dec 03 '20 14:12 emilyistoofunky