Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

✨ Feature - Pull Request Audit #93

Open
Jord-Gui opened this issue Nov 20, 2023 · 2 comments
Open

✨ Feature - Pull Request Audit #93

Jord-Gui opened this issue Nov 20, 2023 · 2 comments
Labels
Area: Backend Relates to backend development e.g. API, Database etc Type: Feature A suggested idea for this project

Comments

@Jord-Gui
Copy link
Member

Jord-Gui commented Nov 20, 2023

Cc: @adamcogan @GordonBeeming

As raised by @sethdailyssw, we currently run this process manually every week. Let’s add an automated Pull Request audit to SSW.Dory.

The flow should be like this:

  1. For each pull request, pull the title and description from GitHub
  2. Run Prompt 1 - Review PR on the title and description (first comment) together. – it will tell you if the pull request is good or needs correction, and the reason
  3. If output = Good, then nothing happens
  4. If output = Needs Correction, then an email is sent. Template

Image

Figure: Use this email template

  1. Run Prompt 2 on the ALL the results – it will generate a summary email
  2. Send that email:
    To: Gordon
    CC: Adam, Seth
@Jord-Gui
Copy link
Member Author

Jord-Gui commented Nov 20, 2023

Prompt 1 - Review PR:

Your task is to analyze a pull request provided by the user.

Step 1: Check the pull request's 'title' field and the first comment in the conversation (the description).

Every title must have:

  1. What the Pull Request will do
  2. How the Pull Request achieved it
    Examples:
    PBI title: Product Backlog Item 100359: "Desktop App | Exporting occasionally failed"
    Fix desktop app exporting - prevent database concurrent access while exporting

Context - every Pull Request must have one of the below as the source of the change:

an issue url (or tag the ID, e.g. #123)
conversation, using the key phrase "as per our conversation"
Relates to #{{ ISSUE NUMBER }}
From email, subject...
I noticed that...
Anything with 'I' in it, as this means the author themself is the source of the change
Note: 'bug' is not an adequate description...the person who is the source is not mentioned (needs to be 'I' noticed the bug or '{{ NAME }} noticed the bug')

Write your output in the following format:
Good/Needs correction - Pull Request #xxx1 by {{ author }}
Reason: {{ if needed }}’

@Jord-Gui
Copy link
Member Author

Jord-Gui commented Nov 20, 2023

Prompt 2:

Gather all the information from the reviewed pull requests and write a message in this exact format:
Note: Good means title and description are adequate, Ok means one of them needs correction, Bad means both title and description need correction. Replace the x with actual numbers.

Hi Adam
Here is your weekly Pull Request report.

Done - SSW.Rules.Content: This week's "PR health" is x/10
✅ Good - x%
🫤 Ok - x%
❌ Bad - x%
📩 Sent - x corrections
💬 Comment - (e.g. Most people are still not putting the source of the change. Some are not understanding ‘what triggered the change’ – they just put what they are fixing.)

Done - SSW.Website (content): This week's "PR health" is x/10
✅ Good - x%
🫤 Ok - x%
❌ Bad - x%
📩 Sent - x corrections
💬 Comment - Most PRs have an issue linked, and the issue usually has the source (some more clear than others)

💬 Check emails with subject: Pull Request Master - Missing PR context

@Jord-Gui Jord-Gui added Area: Backend Relates to backend development e.g. API, Database etc Type: Feature A suggested idea for this project labels Nov 20, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area: Backend Relates to backend development e.g. API, Database etc Type: Feature A suggested idea for this project
Projects
None yet
Development

No branches or pull requests

1 participant