Enabaling the GitHub actions
workflow that automatically generates the
README.md file for all the repositiories within an organization (both public and private) requires an initial setup at
the organizational level in GitHub before private repos will appear in the README.
You'll need an admin/owner for the organization this repo is a part of to follow instructions from GitHub on adding the
Read and Write permissions
scope for actions for the GitHub actions GITHUB_TOKEN
used for authentication. Have the
organization admin/owner follow instructions fro GitHub on
configuring the default token permissions.
The organizational admin/owner will also need to set up a
personal access token
owned by the organization and add it to the repository's secrets with the name REPO_FINE_GRAIN_TOKEN
for the worklfow
to have permissions to read all repos (public and private) owned by the organization. Note that this will grant
round-about access to read all repos (both public and private) owned by the organization and which may not be desireable
in public repositories or private repositories with collaborators from outside of the organization.
If you only want public repos listed the GITHUB_TOKEN
can be specified in place of REPO_FINE_GRAIN_TOKEN
in the
workflow yaml file and the above step of making a personal access token can be skipped.
Local development requires the installation of GitHub CLI and the configuration of it with your GitHub account.
The GitHUb Action organizes the repos based on specific topics. Esentially, if a repo is tagged with one or more specific Topics then it'll appear formatted in the given section of the autogenerated README.
Sections are mapped to topics using the following table:
Section | Associated Topic |
---|---|
Software Development | software |
Project-based Analysis | see below for per-project topics |
DevOps | devops |
SciOps | sciops |
Pipelines | pipeline |
Support | support |
Workflow Management | workflow |
Miscellaneous | all other topics not listed above |
Per-project Topics: cystic-fibrosis, mecfs, nf1, ptc, pvp, pah, udn
Adding a new per-project topic follows these steps:
- add the project/disease acronym as a Topic tag to your repo(s)
- add a new project subsection under the
## Project-based Analysis
heading in the generate README script - copy the whole
gh
command from another per-project section under your new section and change theXXX
in the topic filter option--topic XXX
to your topic from step 1 - add your topic to the blacklist on the
gh
command in the## Miscellaneous
section - update the Topic Mappings section of this doc to include the info on your new topic
Part of the process of using this automatic generation of an updated README is checking that the new changes look good and run. All of the query and formatting logic is contained within the generate README script and this script is run by the GitHub action. To test updates to the script ensure that you've installed and configured the GitHub CLI and then the README can be updated by running the following command from the root directory of the repo
bash .github/generate_readme.sh
You can inspect the README text as well as preview the markdown rendering if using VS Code. Once the changes look satisfactory commit and push the changes to your branch and submit a PR for them to be merged into the main branch.