Skip to content

Commit c9ef296

Browse files
authored
Merge pull request #41768 from github/repo-sync
Repo sync
2 parents 48ea107 + a4f5dcd commit c9ef296

File tree

13 files changed

+243
-4
lines changed

13 files changed

+243
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Docs changelog
22

3+
**9 December 2025**
4+
5+
We published [a guide](https://docs.github.com/en/enterprise-cloud@latest/admin/concepts/enterprise-best-practices/use-innersource) to help customers set up innersource practices in their enterprise. The guide also provides a conceptual introduction to features like internal visibility, organization base permissions, and roles for external collaborators.
6+
7+
<hr>
8+
39
**8 December 2025**
410

511
We've added a new tutorial on how to use Copilot Chat to write code for you. The tutorial steps you through how to create a time tracking web app using only prompts in Copilot Chat.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Best practices for enterprises
3+
shortTitle: Best practices
4+
intro: 'Follow best practices to set up your enterprise''s teams for success.'
5+
versions:
6+
ghes: '*'
7+
ghec: '*'
8+
topics:
9+
- Enterprise
10+
children:
11+
- /organize-work
12+
- /use-innersource
13+
contentType: concepts
14+
---

content/admin/concepts/best-practices.md renamed to content/admin/concepts/enterprise-best-practices/organize-work.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Best practices for organizing work in your enterprise
3-
shortTitle: Best practices
3+
shortTitle: Organize work
44
intro: Promote collaboration and manage resources at scale by following {% data variables.product.company_short %}-recommended practices for managing organizations and teams.
55
versions:
66
ghec: '*'
@@ -15,11 +15,18 @@ redirect_from:
1515
- /admin/user-management/managing-organizations-in-your-enterprise/best-practices-for-structuring-organizations-in-your-enterprise
1616
- /admin/managing-accounts-and-repositories/managing-organizations-in-your-enterprise/best-practices-for-structuring-organizations-in-your-enterprise
1717
- /admin/concepts/best-practices-for-enterprises
18+
- /admin/concepts/best-practices
1819
allowTitleToDifferFromFilename: true
1920
---
2021

2122
{% data reusables.enterprise-onboarding.best-practices %}
2223

24+
## Use innersource practices
25+
26+
Innersource makes it easy for all employees to discover and reuse work. This allows development teams to learn from each other and avoid duplicating effort to recreate common services.
27+
28+
For guidance on setting up effective innersource practices, see [AUTOTITLE](/admin/concepts/enterprise-best-practices/use-innersource).
29+
2330
{% ifversion ghec %}
2431

2532
## Next steps
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Using innersource in your enterprise
3+
shortTitle: Use innersource
4+
intro: Help dispersed teams to collaborate by setting up open source–style workflows in your enterprise, without compromising on security.
5+
versions:
6+
ghec: '*'
7+
ghes: '*'
8+
contentType: concepts
9+
topics:
10+
- Accounts
11+
- Enterprise
12+
- Fundamentals
13+
allowTitleToDifferFromFilename: true
14+
---
15+
16+
{% data reusables.enterprise-onboarding.use-innersource %}

content/admin/concepts/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ children:
1111
- /enterprise-fundamentals
1212
- /identity-and-access-management
1313
- /security-and-compliance
14-
- /best-practices
14+
- /enterprise-best-practices
1515
contentType: concepts
1616
---
1717

content/copilot/tutorials/copilot-chat-cookbook/testing-code/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ children:
1212
- /generate-unit-tests
1313
- /create-mock-objects
1414
- /create-end-to-end-tests
15+
- /update-unit-tests
1516
contentType: tutorials
1617
---
1718

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
title: Updating unit tests to match code changes
3+
shortTitle: Update unit tests
4+
intro: '{% data variables.copilot.copilot_chat_short %} can help with updating your tests.'
5+
versions:
6+
feature: copilot
7+
category:
8+
- Testing code
9+
- Author and optimize with Copilot
10+
complexity:
11+
- Intermediate
12+
octicon: beaker
13+
topics:
14+
- Copilot
15+
contentType: tutorials
16+
---
17+
18+
When you make changes to your code, it's important to update any tests to verify the new behavior and catch any bugs that the new code has introduced. {% data variables.copilot.copilot_chat_short %} can help you quickly update tests to match your code changes, ensuring your test suite stays in sync with your implementation.
19+
20+
## Example scenario
21+
22+
Imagine you have a Python function, `calculate_discount`, that determines the discount for a given purchase amount. In the original code, you get a 10% discount for amounts over $100. You're making changes to the logic of the function, so that only prices over $150 get a 10% discount, and there's now a 20% discount for amounts over $200.
23+
24+
### Original code
25+
26+
In the original code, purchase prices above $100 get a 10% discount.
27+
28+
```python
29+
def calculate_discount(amount: float) -> float:
30+
if amount > 100:
31+
return amount * 0.1 # 10% discount
32+
return 0.0
33+
```
34+
35+
### Updated code
36+
37+
In the changed code, only amounts above $150 get 10% discount, and amounts above $200 now get a 20% discount.
38+
39+
```python id=calculate_discount
40+
def calculate_discount(amount: float) -> float:
41+
if amount > 200:
42+
return amount * 0.2
43+
elif amount > 150:
44+
return amount * 0.1
45+
return 0.0
46+
```
47+
48+
### Existing tests
49+
50+
This example shows the existing tests that were written for the original code.
51+
52+
```python
53+
import unittest
54+
from discount import calculate_discount
55+
56+
class TestCalculateDiscount(unittest.TestCase):
57+
def test_discount_above_100(self):
58+
# $140 should get a $14 discount (10%)
59+
self.assertAlmostEqual(calculate_discount(140), 14.0)
60+
61+
def test_discount_below_100(self):
62+
# $80 should get no discount
63+
self.assertEqual(calculate_discount(80), 0.0)
64+
65+
def test_discount_exactly_100(self):
66+
# $100 is not above 100, so no discount
67+
self.assertEqual(calculate_discount(100), 0.0)
68+
69+
if __name__ == '__main__':
70+
unittest.main()
71+
```
72+
73+
## Example prompt
74+
75+
You can ask {% data variables.copilot.copilot_chat_short %} to identify and update any tests affected by your logic change.
76+
77+
```copilot
78+
Given the update to the `calculate_discount` function, update the unit tests that may fail or become outdated as a result.
79+
```
80+
81+
## Example response
82+
83+
{% data reusables.copilot.example-prompts.response-is-an-example %}
84+
85+
{% data variables.copilot.copilot_chat_short %} analyzes your code and existing tests, and identifies which tests will fail or are now misleading following your code change.
86+
87+
For example, {% data variables.copilot.copilot_chat_short %} explains that:
88+
* `test_discount_above_100` will now **fail**
89+
* `test_discount_below_100` and `test_discount_exactly_100` will pass, but they are now **misleading**, since the threshold for the 10% discount is now $150, and not $100.
90+
91+
In addition, {% data variables.copilot.copilot_chat_short %} identifies any **missing test coverage**, such as the new 20% discount tier for amounts over $200.
92+
93+
{% data variables.copilot.copilot_chat_short %} proposes an updated set of tests.
94+
95+
### Updated tests
96+
97+
```python
98+
import unittest
99+
from discount import calculate_discount
100+
101+
class TestCalculateDiscount(unittest.TestCase):
102+
def test_discount_above_200(self):
103+
# $250 should get a $50 discount (20%)
104+
self.assertAlmostEqual(calculate_discount(250), 50.0)
105+
106+
def test_discount_above_150(self):
107+
# $175 should get a $17.50 discount (10%)
108+
self.assertAlmostEqual(calculate_discount(175), 17.5)
109+
110+
def test_discount_at_or_below_150(self):
111+
# $150 is not above 150, so no discount
112+
self.assertEqual(calculate_discount(150), 0.0)
113+
# $80 should get no discount
114+
self.assertEqual(calculate_discount(80), 0.0)
115+
116+
if __name__ == '__main__':
117+
unittest.main()
118+
```
119+
120+
## Further reading
121+
122+
{% data reusables.copilot.example-prompts.further-reading-items %}

content/enterprise-onboarding/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ journeyTracks:
3333
- '/enterprise-onboarding/setting-up-organizations-and-teams/about-teams-in-an-enterprise'
3434
- '/enterprise-onboarding/setting-up-organizations-and-teams/creating-teams'
3535
- '/enterprise-onboarding/setting-up-organizations-and-teams/assigning-roles-to-teams-and-users'
36+
- '/enterprise-onboarding/setting-up-organizations-and-teams/use-innersource'
3637
- id: 'support_for_your_enterprise'
3738
title: 'Creating a support model for your enterprise'
3839
description: 'Find out how to get help and choose who will be able to contact Support.'

content/enterprise-onboarding/setting-up-organizations-and-teams/assigning-roles-to-teams-and-users.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ topics:
1414

1515
## Next steps
1616

17-
Now that you've set up organizations and teams to manage people's access to work in your enterprise, learn about support so you can get help when you need it. See [AUTOTITLE](/enterprise-onboarding/support-for-your-enterprise/understanding-support).
17+
Learn how to set up a culture of innersource in your enterprise to allow teams to collaborate and work efficiently. See [AUTOTITLE](/enterprise-onboarding/setting-up-organizations-and-teams/use-innersource).

content/enterprise-onboarding/setting-up-organizations-and-teams/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ children:
1717
- /about-teams-in-an-enterprise
1818
- /creating-teams
1919
- /assigning-roles-to-teams-and-users
20+
- /use-innersource
2021
---
2122

0 commit comments

Comments
 (0)