Skip to content

Commit 4629288

Browse files
xitij2000feanil
authored andcommitted
feat: Update the community PR message to have collapsible sections
The current community message is quite long and key information is hard to access at a glance. This condenses the message by collapsing sections that have verbose information and putting key information at the start of the message.
1 parent c0b972a commit 4629288

File tree

2 files changed

+34
-35
lines changed

2 files changed

+34
-35
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
11
Thanks for the pull request, @{{ user }}!
22

3-
### What's next?
3+
{% if owner %}
4+
This repository is currently maintained by @{{ owner }}.
5+
{% else %}
6+
{% if lifecycle == 'production' %}
7+
This repository has no maintainer (yet).
8+
{% else %}
9+
This repository is currently unmaintained.
10+
{% endif %}
11+
<details><summary><h4>:radio_button: Find a technical reviewer</h4></summary>
12+
To get help with finding a technical reviewer, tag the community contributions project manager for this PR in a comment and let them know that your changes are ready for review:
413

5-
*Please work through the following steps to get your changes ready for engineering review:*
14+
1. On the right-hand side of the PR, find the Contributions project, click the caret in the top right corner to expand it, and check the "Primary PM" field for the name of your PM.
15+
2. Find their GitHub handle [here](https://openedx.atlassian.net/wiki/spaces/COMM/pages/3548807177/Community+Contributions+Project+Manager#Current-OSPR-Project-Managers).
16+
</details>
17+
{% endif %}
618

7-
#### :radio_button: Get product approval
19+
Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.
20+
21+
<details><summary><h4>:radio_button: Get product approval</h4></summary>
822

923
If you haven't already, [check this list](https://openedx.atlassian.net/wiki/spaces/COMM/pages/3875962884/How+to+submit+an+open+source+contribution+for+Product+Review#Does-my-contribution-require-Product-Review%3F) to see if your contribution needs to go through the product review process.
1024

1125
- If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the [Product Working Group](https://openedx.atlassian.net/wiki/spaces/COMM/pages/3449028609/Product+Working+Group).
1226
- This process (including the steps you'll need to take) is documented [here](https://openedx.atlassian.net/wiki/spaces/COMM/pages/3875962884/How+to+submit+an+open+source+contribution+for+Product+Review#Product-Review-Process).
1327
- If it doesn't, simply proceed with the next step.
14-
15-
#### :radio_button: Provide context
28+
</details><details>
29+
<summary><h4>:radio_button: Provide context</h4></summary>
1630

1731
To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
1832

@@ -26,9 +40,9 @@ To help your reviewers and other members of the community understand the purpose
2640
> This is for a course on edx.org.
2741
- Supporting documentation
2842
- Relevant [Open edX discussion forum](https://discuss.openedx.org/) threads
29-
43+
</details><details>
3044
{% if not has_signed_agreement %}
31-
#### :radio_button: Submit a signed contributor agreement (CLA)
45+
<summary><h4>:radio_button: Submit a signed contributor agreement (CLA)</h4></summary>
3246

3347
:warning: We ask all contributors to the Open edX project to submit a [signed contributor agreement](https://openedx.org/cla) or indicate their institutional affiliation.
3448
Please see the [CONTRIBUTING](https://github.com/openedx/.github/blob/master/CONTRIBUTING.md) file for more information.
@@ -39,58 +53,43 @@ See [The New Home of the Open edX Codebase](https://open.edx.org/blog/the-new-ho
3953
Once you've signed the CLA, please allow 1 business day for it to be processed.
4054
After this time, you can re-run the CLA check by adding a comment below that you have signed it.
4155
If the CLA check continues to fail, you can tag the `@openedx/cla-problems` team in a comment for further assistance.
42-
56+
</details><details>
4357
<!-- comment:no_cla -->
4458
{% endif %}
4559

4660
{% if is_first_time %}
47-
#### :radio_button: Wait for tests to be enabled
61+
<summary><h4>:radio_button: Wait for tests to be enabled</h4></summary>
4862

4963
It looks like you are contributing to this repository for the first time.
5064
This means that automated tests won't run automatically, and that you'll need to wait for a test run to be authorized.
5165

5266
If you're experiencing a delay of two weeks or more at this step, tag the [community contributions project managers](https://openedx.atlassian.net/wiki/spaces/COMM/pages/3548807177/Community+Contributions+Project+Manager#Current-OSPR-Project-Managers) in a comment and ask for help.
67+
</details><details>
5368
{% endif %}
5469

55-
#### :radio_button: Get a green build
70+
<summary><h4>:radio_button: Get a green build</h4></summary>
5671

5772
If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.
58-
73+
</details><details>
5974
{% if is_draft %}
60-
#### :radio_button: Update the status of your PR
75+
<summary><h4>:radio_button: Update the status of your PR</h4></summary>
6176

6277
Your PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate.
63-
78+
</details><details>
6479
<!-- comment:end_of_wip -->
6580
{% endif %}
6681

67-
#### :radio_button: Let us know that your PR is ready for review:
82+
---
6883

69-
### Who will review my changes?
70-
71-
{% if owner %}
72-
This repository is currently maintained by `@{{ owner }}`. Tag them in a comment and let them know that your changes are ready for review.
73-
{% else %}
74-
{% if lifecycle == 'production' %}
75-
This repository has no maintainer (yet).
76-
{% else %}
77-
This repository is currently unmaintained.
78-
{% endif %}
79-
To get help with finding a technical reviewer, tag the community contributions project manager for this PR in a comment and let them know that your changes are ready for review:
80-
81-
1. On the right-hand side of the PR, find the Contributions project, click the caret in the top right corner to expand it, and check the "Primary PM" field for the name of your PM.
82-
2. Find their GitHub handle [here](https://openedx.atlassian.net/wiki/spaces/COMM/pages/3548807177/Community+Contributions+Project+Manager#Current-OSPR-Project-Managers).
83-
{% endif %}
84-
85-
### Where can I find more information?
84+
<summary><h3>Where can I find more information? </h3></summary>
8685

8786
If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
8887

8988
- [Overview of Review Process for Community Contributions](https://docs.openedx.org/en/latest/developers/references/developer_guide/process/FAQ-about-pull-requests.html)
9089
- [Pull Request Status Guide](https://docs.openedx.org/en/latest/developers/references/developer_guide/process/pull-request-statuses.html)
9190
- [Making changes to your pull request](https://docs.openedx.org/en/latest/documentors/how-tos/make_changes_to_your_pull_request.html)
92-
93-
### When can I expect my changes to be merged?
91+
</details><details>
92+
<summary><h3>When can I expect my changes to be merged?</h3></summary>
9493

9594
Our goal is to get community contributions seen and reviewed as efficiently as possible.
9695

@@ -101,5 +100,5 @@ However, the amount of time that it takes to review and merge a PR can vary sign
101100
- Maintenance status of the parent repository
102101

103102
:bulb: *As a result it may take up to several weeks or months to complete a review and merge your PR.*
104-
103+
</details>
105104
<!-- comment:external_pr -->

tests/test_pull_request_opened.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def test_pr_with_owner_repo_opened(get_catalog_info, fake_github, owner, tag, mo
9595
pr_comments = pr.list_comments()
9696
assert len(pr_comments) == 1
9797
body = pr_comments[0].body
98-
assert f"This repository is currently maintained by `{tag}`" in body
98+
assert f"This repository is currently maintained by {tag}" in body
9999

100100

101101
@pytest.mark.parametrize("lifecycle", ["production", "deprecated", None])

0 commit comments

Comments
 (0)