Skip to content

Commit 2ec07a8

Browse files
authored
Use monospace for programming terms in documentation (#12)
This PR updates the documentation guidelines to use monospace formatting for programming terms. The changes improve readability and consistency in the documentation. Key changes: - Modified the USER_PROMPT in sum_diff/__init__.py - Added instructions to use backticks (`) for enclosing programming language keywords, identifiers, library class names, and constants - Updated the PR title and description guidelines to include monospace formatting - Added an example output section to demonstrate proper usage The changes aim to enhance the clarity of documentation by visually distinguishing programming terms from regular text. This will make it easier for developers to identify and understand code-related elements within the documentation. Implementation details: - Backticks (`) are used for inline code formatting in Markdown - The guidelines now explicitly mention using monospace for programming terms in both PR titles and descriptions These updates will help maintain a consistent style across all documentation and improve the overall quality of Pull Request submissions.
1 parent a10127d commit 2ec07a8

File tree

1 file changed

+57
-6
lines changed

1 file changed

+57
-6
lines changed

sum_diff/__init__.py

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
"""
2929

3030
USER_PROMPT = """
31+
## Input
32+
3133
First, here is the git branch name:
3234
<branch_name>
3335
{branch_name}
@@ -38,31 +40,43 @@
3840
{diff}
3941
</code_diff>
4042
41-
Analyze the branch name:
42-
1. Look for keywords or patterns that indicate the purpose of the changes (e.g., "work", "fix", "feature", "bugfix", "hotfix", "refactor").
43+
## Analysis
44+
45+
### Analyze the branch name:
46+
1. Look for keywords or patterns that indicate the purpose of the changes (e.g., "work", "fix",
47+
"feature", "bugfix", "hotfix", "refactor").
4348
2. Identify any ticket or issue numbers if present.
4449
3. Note any specific components or areas of the codebase mentioned.
4550
46-
Review the code diff:
51+
### Review the code diff:
4752
1. Identify the files that have been modified, added, or deleted.
4853
2. Understand the main changes and their purpose.
4954
3. Look for any significant additions or removals of functionality.
5055
4. Note any changes to dependencies or configuration files.
5156
52-
Writing the PR title:
57+
## Writing the PR title:
5358
1. Keep it concise (50-70 characters if possible).
5459
2. Start with a capital letter and use present tense.
5560
3. Summarize the main purpose of the changes.
5661
4. Include the ticket or issue number if present in the branch name.
62+
5. Use backticks (`) to enclose programming language keywords, identifiers, library class names, or
63+
constants that would benefit from being highlighted.
5764
58-
Composing the PR description:
65+
## Composing the PR description:
5966
1. Provide a brief overview of the changes (1-2 sentences).
6067
2. List the main components or areas affected.
6168
3. Explain the reason for the changes and their impact.
6269
4. Mention any important implementation details.
6370
5. Add any relevant links or references.
71+
6. Use backticks (`) to enclose programming language keywords, identifiers, library class names, or
72+
constants that would benefit from being highlighted.
73+
7. When appropriate, include code examples using Markdown code blocks (```). Provide an explanation
74+
of the intent and content of the code example.
75+
76+
## Output
77+
78+
Format your response in the following way:
6479
65-
Output your response into your <response> in the following format:
6680
<pr_title>
6781
Your PR title here
6882
</pr_title>
@@ -73,6 +87,43 @@
7387
7488
Remember to base your PR title and description solely on the information provided in the branch name
7589
and code diff. Do not include any external information or assumptions beyond what is given.
90+
91+
## Example Output
92+
93+
Here's an example of how your output might look:
94+
95+
<pr_title>
96+
Add `UserAuthentication` class to improve login process (#123)
97+
</pr_title>
98+
99+
<pr_description>
100+
This PR introduces a new `UserAuthentication` class to enhance the login process and improve overall
101+
security.
102+
103+
Key changes:
104+
- Create `UserAuthentication` class in `auth/user_authentication.rb`
105+
- Implement password hashing using `bcrypt` gem
106+
- Update `User` model to utilize the new authentication class
107+
108+
The `UserAuthentication` class encapsulates the login logic and password management, separating
109+
these concerns from the `User` model. This change improves code organization and makes it easier to
110+
maintain and extend authentication functionality in the future.
111+
112+
Example usage of the new class:
113+
114+
```ruby
115+
user_auth = UserAuthentication.new(user)
116+
if user_auth.authenticate(password)
117+
# Proceed with login
118+
else
119+
# Handle authentication failure
120+
end
121+
```
122+
123+
This new implementation ensures that passwords are securely hashed and compared, reducing the risk of password-related vulnerabilities.
124+
125+
Please review the changes and provide feedback on the new authentication flow.
126+
</pr_description>
76127
"""
77128

78129

0 commit comments

Comments
 (0)