diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..046ceb7 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @github-community-projects/ospo \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..33ade95 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at opensource@github.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..cdda2fb --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,33 @@ +# Contributing + +[fork]: https://github.com/github-community-projects/org-metrics-dashboard/fork +[pr]: https://github.com/github-community-projects/org-metrics-dashboard/compare +[code-of-conduct]: CODE_OF_CONDUCT.md + +Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. + +Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE.md). + +Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. + +## Submitting a pull request + +1. [Fork][fork] and clone the repository +1. Configure and install the dependencies: `npm i` +1. Make sure the tests pass on your machine: `npm t` +1. Create a new branch: `git checkout -b my-branch-name` +1. Make your change, add tests, and make sure the tests still pass +1. Push to your fork and [submit a pull request][pr] +1. Pat yourself on the back and wait for your pull request to be reviewed and merged. + +Here are a few things you can do that will increase the likelihood of your pull request being accepted: + +- Follow the style by fixing any ESLint errors. +- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests. +- Write a [good commit message](https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/). + +## Resources + +- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) +- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) +- [GitHub Help](https://help.github.com) diff --git a/README.md b/README.md index 6fa6fbd..3b0bc5f 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,50 @@ -# World Health Org Metrics Project +# Org Metrics Dashboard -## Problem Statement +An actions-powered dashboard to get an overview of your organization's repository health. -The World Health Organization leads global efforts to expand universal health coverage. They direct and coordinate the world’s response to health emergencies however there is currently no integrated digital environment for public health experts from all around the globe to collaborate on pandemic and epidemic intelligence and ongoing public health emergency events. The World Health Organization is exploring how to easily collaborate with external experts around the world to work on public health issues like COVID-19. +Image preview -## Goal +[![Image preview](./assets/preview.png)](https://github-community-projects.github.io/org-metrics-dashboard) -Monitor open source health across different projects to have a high level view the best practices adopted by various open source projects to help build interest in open source work and advocate for more open source development +## Setting up the project for your organization -Issue Project [here](https://github.com/github/SI-skills-based-volunteering/issues/147#issuecomment-1472370039) +### Fork the repository -## Configuration +You will need to [fork this repository](https://github.com/github-community-projects/org-metrics-dashboard/fork) into your org. Alternatively, you can clone this repository and push it to your org. + +### Actions + +Since we use the GitHub API and actions to generate the data, you will need to enable actions for the repository. You can do this by going to the `Actions` tab in the repository and enabling actions. + +You will need to set a secret in the repository settings. The secret is a GitHub token that has admin read access to the organization. You can create a token by going to `Settings` -> `Developer settings` -> `Personal access tokens` and creating a new token with the following scopes. + +- read:org +- read:repo +- read:project + +> [!NOTE] +> To fetch collaborator counts, you need to provide a token that is an admin of the organization. + +The secret should be named `GRAPHQL_TOKEN`. + +### Configuration There is a `config.yml` located in the root of the project that contains the configuration for the project. The configuration is as follows: ```yaml --- # The GitHub organization name -organization: 'YOUR_ORG_NAME' +organization: 'github-community-projects' # An ISO 8601 date string representing the date to start fetching data from since: '2024-02-22' +# Path of the github pages site. i.e. github-community-projects.github.io/org-metrics-dashboard +# This will typically be "/{REPOSITORY_NAME}" if you are hosting on GitHub pages +basePath: '/org-metrics-dashboard' ``` -This modifies the behavior of the fetcher to fetch data from the specified organization and since the specified date. +- `organization`: The name of the organization you want to fetch data from. +- `since`: The date to start fetching data from. This is useful if you want to fetch data from a specific date. +- `basePath`: **Important**. This is the path where the site will be hosted. If you are hosting the site on GitHub pages, you will need to set this to the repository name for links and assets to work correctly. ## Development @@ -31,14 +53,14 @@ This project is split into two parts: - **app**: the code for the frontend - **backend**: the code for the backend and fetcher -Both are written in TypeScript. We use npm workspaces to manage the dependencies between the two projects. +Both are written in TypeScript. We use [npm workspaces](https://docs.npmjs.com/cli/v8/using-npm/workspaces) to manage the dependencies between the two projects. ### Prerequisites - Node.js 20.X or later - npm -### Environment Variables +### Environment variables You will need a `.env` file in the root of the project: diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..ef183e6 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,31 @@ +Thanks for helping make GitHub safe for everyone. + +# Security + +GitHub takes the security of our software products and services seriously, including all of the open source code repositories managed through our GitHub organizations, such as [GitHub](https://github.com/GitHub). + +Even though [open source repositories are outside of the scope of our bug bounty program](https://bounty.github.com/index.html#scope) and therefore not eligible for bounty rewards, we will ensure that your finding gets passed along to the appropriate maintainers for remediation. + +## Reporting Security Issues + +If you believe you have found a security vulnerability in any GitHub-owned repository, please report it to us through coordinated disclosure. + +**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** + +Instead, please send an email to opensource-security[@]github.com. + +Please include as much of the information listed below as you can to help us better understand and resolve the issue: + +- The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting) +- Full paths of source file(s) related to the manifestation of the issue +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- Step-by-step instructions to reproduce the issue +- Proof-of-concept or exploit code (if possible) +- Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +## Policy + +See [GitHub's Safe Harbor Policy](https://docs.github.com/en/site-policy/security-policies/github-bug-bounty-program-legal-safe-harbor#1-safe-harbor-terms) diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..eba3993 --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,13 @@ +# Support + +## How to file issues and get help + +This project uses GitHub issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new issue. + +For help or questions about using this project, please file an issue or start a GitHub discussion. + +Internal Contribution Forks is under active development and maintained by GitHub staff **and the community**. We will do our best to respond to support, feature requests, and community questions in a timely manner. + +## GitHub Support Policy + +Support for this project is limited to the resources listed above. diff --git a/app/public/images/logo.png b/app/public/images/logo.png new file mode 100644 index 0000000..e03d8dd Binary files /dev/null and b/app/public/images/logo.png differ diff --git a/app/public/images/logo.svg b/app/public/images/logo.svg deleted file mode 100644 index f140d43..0000000 --- a/app/public/images/logo.svg +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - World Health Organization - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/components/Layout.tsx b/app/src/components/Layout.tsx index 065109e..6defee4 100644 --- a/app/src/components/Layout.tsx +++ b/app/src/components/Layout.tsx @@ -20,7 +20,7 @@ export const Layout: FC = ({ children }) => { World Health Organization logo = ({ children }) => { - This project includes metrics about the Open Source repositories for - the {data.orgInfo.name}. + This project includes metrics about the Open Source repositories for{' '} + {data.orgInfo.name}. {!isSSR && showBanner && ( diff --git a/assets/preview.png b/assets/preview.png new file mode 100644 index 0000000..19a1f50 Binary files /dev/null and b/assets/preview.png differ diff --git a/config.yml b/config.yml index 03c84f3..45b13a1 100644 --- a/config.yml +++ b/config.yml @@ -1,4 +1,10 @@ --- -organization: 'WorldHealthOrganization' -since: '2008-01-01' +# Organization to pull metrics from +organization: 'github-community-projects' + +# Start date to pull metrics from +since: '2023-01-01' + +# GitHub Pages path to the repository +# Used for handling relative paths for assets basePath: '/sbv-world-health-org-metrics'