Open source project information is pulled from a list of official Commerce Github organizations for publication to Commerce.gov/code.json.
Additions to the list of Commerce organizations is possible through Github pull requests to this repository.
For project additions from sources other than Github, a process will be defined and added here in the future.
- Ensure your office's official Github organization is in conf.yml. If not see Adding your official Github organization.
- Publish your project to a public Github repository under your official organization.
- Include a .codeinventory.json or .codeinventory.yml in your project for more fine-grained control over metadata or to include details not available in Github metadata.
If your project is not included in the code.json published to Commerce.gov, please submit an issue.
- Fork this repository
- Add your Github organization to conf.yml in the organizations array
- Commit and push the changes to your Fork
- Submit a pull request to the upstream project
Tools for generating the Department of Commerce code catalog for OMB M-16-21.
The included generate.rb
script currently leverages GSA's CodeInventory tool to generate a code catalog from one or more organization's GitHub accounts.
- Ruby 2.3.0 or later (the codeinventory gem uses Hash#dig, which was introduced in Ruby 2.3.0)
- codeinventory gem
- codeinventory-github gem
- Edit config.yml to identify the agency name and list GitHub organizations to be harvested.
- Create a secrets.yml, using secrets.yml.sample as a template, to provide a GitHub personal access token.
- Execute the generate.rb script and pipe the output (code catalog) to a file:
ruby generate.rb > code.json