Skip to content

Commit

Permalink
Repo File Sync: Synced file(s) with microsoft/mu_devops (microsoft#214)
Browse files Browse the repository at this point in the history
Synced local file(s) with
[microsoft/mu_devops](https://github.com/microsoft/mu_devops).

🤖: View the [Repo File Sync Configuration
File](https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml)
to see how files are synced.

---

This PR was created automatically by the
[repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action)
workflow run
[#3744565799](https://github.com/microsoft/mu_devops/actions/runs/3744565799)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
  • Loading branch information
uefibot authored and TaylorBeebe committed Apr 27, 2023
1 parent 1177d96 commit b97252c
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 29 deletions.
55 changes: 27 additions & 28 deletions .github/advanced-issue-labeler.yml
Expand Up @@ -16,33 +16,32 @@
# https://github.com/redhat-plumbers-in-action/advanced-issue-labeler

policy:
- template: [bug_report.yml, documentation_request.yml, feature_request.yml]
section:
- section:

# Issue Template - Urgency Dropdown
- id: ['urgency']
block-list: []
label:
- name: 'urgency:low'
keys: ['Low']
- name: 'urgency:medium'
keys: ['Medium']
- name: 'urgency:high'
keys: ['High']
# Issue Template - Urgency Dropdown
- id: ['urgency']
block-list: []
label:
- name: 'urgency:low'
keys: ['Low']
- name: 'urgency:medium'
keys: ['Medium']
- name: 'urgency:high'
keys: ['High']

# Issue Template - Fix Owner Dropdown
- id: ['fix_owner', 'request_owner']
block-list: []
label:
- name: 'state:needs-owner'
keys: [
'Someone else needs to fix it',
'Someone else needs to make the change',
'Someone else needs to implement the feature'
]
- name: 'state:needs-triage'
keys: [
'Someone else needs to fix it',
'Someone else needs to make the change',
'Someone else needs to implement the feature'
]
# Issue Template - Fix Owner Dropdown
- id: ['fix_owner', 'request_owner']
block-list: []
label:
- name: 'state:needs-owner'
keys: [
'Someone else needs to fix it',
'Someone else needs to make the change',
'Someone else needs to implement the feature'
]
- name: 'state:needs-triage'
keys: [
'Someone else needs to fix it',
'Someone else needs to make the change',
'Someone else needs to implement the feature'
]
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
@@ -1,3 +1,9 @@
# Preface

Please ensure you have read the [contribution docs](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md) prior
to submitting the pull request. In particular,
[pull request guidelines](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md#pull-request-best-practices).

## Description

<_Please include a description of the change and why this change was made._>
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/triage-issues.yml
Expand Up @@ -18,5 +18,5 @@ on:
types: [ opened ]

jobs:
sync:
triage:
uses: microsoft/mu_devops/.github/workflows/IssueTriager.yml@v1.3.0
46 changes: 46 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -46,6 +46,52 @@ If you cannot find an existing issue that describes your bug or feature, create
Please continue to follow your request after it is submitted to assist with any additional information that might be
requested.

### Pull Request Best Practices

Pull requests for UEFI code can become large and difficult to review due to the large number of build and
configuration files. To aid maintainers in reviewing your code, we suggest adhering to the following guidelines:

1. Do keep code reviews single purpose; don't add more than one feature at a time.
2. Do fix bugs independently of adding features.
3. Do provide documentation and unit tests.
4. Do introduce code in digestible amounts.
* If the contribution logically be broken up into separate pull requests that independently build and function
successfully, do use multiple pull requests.

#### Code Categories

To keep code digestible, you may consider breaking large pull requests into three categories of commits within the pull
request.

1. **Interfaces**: .h, .inf, .dec, documentation
2. **Implementation**: .c, unit tests, unit test build file; unit tests should build and run at this point
3. **Integration/Build**: .dec, .dsc, .fdf, (.yml) configuration files, integration tests; code added to platform and
affects downstream consumers

By breaking the pull request into these three categories, the pull request reviewers can digest each piece
independently.

If your commits are still very large after adhering to these categories, consider further breaking the pull request
down by library/driver; break each component into its own commit.

#### Implementation Limits

Implementation is ultimately composed of functions as logical units of code.

To help maintainers review the code and improve long-term maintainability, limit functions to 60 lines of code. If your
function exceeds 60 lines of code, it likely has also exceeded a single responsibility and should be broken up.

Files are easier to review and maintain if they contain functions that serves similar purpose. Limit files to around
1,000 lines of code (excluding comments). If your file exceeds 1,000 lines of code, it may have functions that should
be split into separate files.

---

By following these guidelines, your pull requests will be reviewed faster, and you'll avoid being asked to refactor the
code to follow the guidelines.

Feel free to create a draft pull request and ask for suggestions on how to split the pull request if you are unsure.

## Thank You

Thank you for your interest in Project Mu and taking the time to contribute!

0 comments on commit b97252c

Please sign in to comment.