Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format .github Directory #1631

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
113 changes: 80 additions & 33 deletions .github/CONTRIBUTING.md
@@ -1,59 +1,106 @@
# Contributions

We welcome contributions in the form of issues and pull requests. We view the contributions and process as the same for internal and external contributors.
We welcome contributions in the form of issues and pull requests. We view the contributions and process as the same for internal and external contributors.

## Issues

Log issues for both bugs and enhancement requests. Logging issues are important for the open community.
Log issues for both bugs and enhancement requests. Logging issues are important for the open community.

Issues in this repository should be for the toolkit packages. General feedback for GitHub Actions should be filed in the [community forums.](https://github.community/t5/GitHub-Actions/bd-p/actions) Runner specific issues can be filed [in the runner repository](https://github.com/actions/runner).
Issues in this repository should be for the toolkit packages. General feedback for GitHub Actions should be filed in the [community discussions](https://github.com/orgs/community/discussions/). Runner-specific issues can be filed in the [GitHub Actions runner repository](https://github.com/actions/runner).

## Enhancements and Feature Requests

We ask that before significant effort is put into code changes, that we have agreement on taking the change before time is invested in code changes.
We ask that, before significant time or effort is put into code changes, we have agreement on the change itself.

1. Create a feature request.
2. When we agree to take the enhancement, create an ADR to agree on the details of the change.
1. Create a feature request.
1. When we agree to take the enhancement, create an Architectural Decision Record (ADR) to agree on the details of the change.

An ADR is an Architectural Decision Record. This allows consensus on the direction forward and also serves as a record of the change and motivation. [Read more here](../docs/adrs/README.md).
An ADR provides consensus on the direction forward and also serves as a record of the change and motivation. [Read more here](../docs/adrs/README.md).

## Development Life Cycle
## Development Lifecycle

This repository uses [Lerna](https://github.com/lerna/lerna#readme) to manage multiple packages. Read the documentation there to begin contributing.

Note that before a PR will be accepted, you must ensure:
- all tests are passing
- `npm run format` reports no issues
- `npm run lint` reports no issues
> [!NOTE]
>
> Before a PR will be accepted, you must ensure:
>
> - All tests are passing
> - `npm run format` reports no issues
> - `npm run lint` reports no issues

### Useful Scripts

- `npm run bootstrap` This runs `lerna exec -- npm install` which will install dependencies in this repository's packages and cross-link packages where necessary.
- `npm run build` This compiles TypeScript code in each package (this is especially important if one package relies on changes in another when you're running tests). This is just an alias for `lerna run tsc`.
- `npm run format` This checks that formatting has been applied with Prettier.
- `npm test` This runs all Jest tests in all packages in this repository.
- If you need to run tests for only one package, you can pass normal Jest CLI options:
```console
$ npm test -- packages/toolkit
```
- `npm run create-package [name]` This runs a script that automates a couple of parts of creating a new package.
- Install dependencies in this repository's packages and cross-link packages where necessary (runs `lerna exec -- npm install`)

```bash
npm run bootstrap
```

- Compile the TypeScript code in each package (alias for `lerna run tsc`)

> This is especially important if one package relies on changes in another.

```bash
npm run build
```

- Check that formatting complies with this repository's [Prettier configuration](../.prettierrc.json)

```bash
# Check formatting
npm run format-check

# Apply formatting
npm run format
```

- Run Jest tests in all packages in this repository

```bash
npm test
```

- Run Jest tests for a specific package in this repository

```console
npm test -- packages/toolkit
```

- Automate initial setup of a new package (see [Creating a Package](#creating-a-package))

```bash
npm run create-package [name]
```

### Creating a Package

1. In a new branch, create a new Lerna package:
1. Create a new branch

```bash
git checkout -b <branch name>
```

1. Create a new Lerna package

```bash
npm run create-package <package-name>
```

```console
$ npm run create-package new-package
```
This will ask you some questions about the new package.

This will ask you some questions about the new package. Start with `0.0.0` as the first version (look generally at some of the other packages for how the package.json is structured).
- Start with `0.0.0` as the first version.
- Look generally at some of the other packages for how the `package.json` is structured.

2. Add `tsc` script to the new package's package.json file:
1. Add the `tsc` script to the new package's `package.json` file:

```json
"scripts": {
"tsc": "tsc"
}
```
```json
{
// ...
"scripts": {
"tsc": "tsc"
}
}
```

3. Start developing 馃槃.
1. Start developing 馃槃
49 changes: 30 additions & 19 deletions .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -4,43 +4,54 @@ about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

Thank you 馃檱鈥嶁檧 for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue **relates to code in this repository**.
Thank you 馃檱鈥嶁檧 for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue **relates to code in this repository**.

* If you have found a security issue [please submit it here](https://hackerone.com/github)
* If you have questions about writing workflows or action files, then please [visit the GitHub Community Forum's Actions Board](https://github.community/t5/GitHub-Actions/bd-p/actions)
* If you are having an issue or question about GitHub Actions then please [contact customer support](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-github-actions#contacting-support)
- If you have found a security issue [please submit it here](https://hackerone.com/github)
- If you have questions about writing workflows or action files, then please [visit the GitHub Community Forum's Actions Board](https://github.community/t5/GitHub-Actions/bd-p/actions)
- If you are having an issue or question about GitHub Actions then please [contact customer support](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-github-actions#contacting-support)

If your issue is relevant to this repository, please include the information below:

**Describe the bug**
### Describe the bug

A clear and concise description of what the bug is.

**To Reproduce**
### Steps to reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
### Expected behavior

A clear and concise description of what you expected to happen.

**Screenshots**
### Screenshots

If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
### Desktop

Please complete the following information:

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

### Smartphone

Please complete the following information:

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
### Additional context

**Additional context**
Add any other context about the problem here.
20 changes: 11 additions & 9 deletions .github/ISSUE_TEMPLATE/enhancement_request.md
Expand Up @@ -4,22 +4,24 @@ about: Create a request to help us improve
title: ''
labels: enhancement
assignees: ''

---

Thank you 馃檱鈥嶁檧 for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue **relates to code in this repository**.
Thank you 馃檱鈥嶁檧 for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue **relates to code in this repository**.

* If you have found a security issue [please submit it here](https://hackerone.com/github)
* If you have questions about writing workflows or action files, then please [visit the GitHub Community Forum's Actions Board](https://github.community/t5/GitHub-Actions/bd-p/actions)
* If you are having an issue or question about GitHub Actions then please [contact customer support](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-github-actions#contacting-support)
- If you have found a security issue [please submit it here](https://hackerone.com/github)
- If you have questions about writing workflows or action files, then please [visit the GitHub Community Forum's Actions Board](https://github.community/t5/GitHub-Actions/bd-p/actions)
- If you are having an issue or question about GitHub Actions then please [contact customer support](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-github-actions#contacting-support)

If your issue is relevant to this repository, please include the information below:

**Describe the enhancement**
### Describe the enhancement

A clear and concise description of what the features or enhancement you need.

**Code Snippet**
If applicable, add a code snippet to show the api enhancement.
### Code snippet

If applicable, add a code snippet to show the API enhancement.

### Additional information

**Additional information**
Add any other context about the feature here.