Skip to content
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
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/new-ontology.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ body:
placeholder: e.g. https://github.com/obophenotype/uberon/issues
validations:
required: true
- type: input
id: contributing
attributes:
label: Contribution Guidelines
description: What is the URL of contribution guidelines? Ideally, this is a file name CONTRIBUTING or CONTRIBUTING.md in the root of your repository.
placeholder: e.g. https://github.com/geneontology/go-ontology/blob/master/CONTRIBUTING.md
validations:
required: true
- type: input
id: download
attributes:
Expand Down
26 changes: 26 additions & 0 deletions tests/test_integrity.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,3 +334,29 @@ def test_repository_license(self):
OBO_TO_SPDX[obo_license],
msg="OBO Foundry license annotation does not match GitHub license",
)

def test_contribution_guidelines(self):
"""Test that a contribution guidelines document is available in an expected location/format."""
for prefix, data in self.ontologies.items():
repository = data["repository"]
if not repository.startswith("https://github.com"):
continue
r = repository.removeprefix("https://github.com/").rstrip("/")
github_data = self._get_github_data(prefix)
default_branch = github_data["default_branch"]
paths = [
# Markdown
f"https://github.com/{r}/blob/{default_branch}/CONTRIBUTING.md",
f"https://github.com/{r}/blob/{default_branch}/docs/CONTRIBUTING.md",
f"https://github.com/{r}/blob/{default_branch}/.github/CONTRIBUTING.md",
# RST
f"https://github.com/{r}/blob/{default_branch}/CONTRIBUTING.rst",
f"https://github.com/{r}/blob/{default_branch}/docs/CONTRIBUTING.rst",
f"https://github.com/{r}/blob/{default_branch}/.github/CONTRIBUTING.rst",
]
self.assertTrue(
any(requests.get(path).status_code == 200 for path in paths),
msg=f"Could not find a CONTRIBUTING.md file in the repository for {prefix} ({repository}) in any of "
"the standard locations defined by GitHub in https://docs.github.com/en/communities/setting-up-"
"your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors.",
)