sred-work-summary

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

SRED Work Summary

SRED工作总结

Collect all the Github PRs, Notion docs and Linear tickets a person completed in a given year. Group the links from all of those into projects. Put everything into a private Notion document and return a link to that document.
收集某人在指定年份完成的所有Github PRs、Notion文档和Linear工单。将所有这些内容的链接按项目分组,放入一个私人Notion文档中,并返回该文档的链接。

Prerequisites

前提条件

Before starting make sure that Github, Notion and Linear can be accessed. Notion and Linear should be connected using an MCP. Github can be connected with an MCP, but if you have access to the
gh
CLI tool, you can use that instead.
If any of these can't be accessed, prompt the user to grant access before proceeding.
开始前请确保可以访问Github、Notion和Linear。Notion和Linear应通过MCP连接。Github也可以通过MCP连接,但如果你能访问
gh
CLI工具,也可以使用该工具替代。
如果其中任何一个无法访问,请提示用户授予权限后再继续。

Process

流程

Step 1

步骤1

bash
undefined
bash
undefined

Get the current year

获取当前年份

date +%Y

The output of this command is the current year.
The current year minus one is the previous year.
date +%Y

该命令的输出为当前年份。当前年份减一即为上一年。

Step 2

步骤2

Collect all of the required information from the user:
Github Username: What is the github username of the user?
Github Repositories: Which Github repositories should be searched for PRs?
The user can either specify a comma separated list, or provide a directory that contains repositories. In the second case use this command in the specified directory:
bash
undefined
向用户收集所有必要信息:
Github用户名:用户的Github用户名是什么?
Github仓库:应该搜索哪些Github仓库中的PRs?
用户可以指定一个逗号分隔的列表,或者提供一个包含仓库的目录。在第二种情况下,在指定目录中使用以下命令:
bash
undefined

Find github repos

查找Github仓库

find . -maxdepth 2 -name ".git" -type d | sed 's//.git$//' | sort

Ensure:
- All the repositories listed are in the `getsentry` Github organization.

The output of this is hereafter referred to as the "user repos".

*Incidents*: Ask if the user wants to include incident documents.

The answer is either yes or no. If the answer is no, that will exclude certain documents from the search later on.

*Other Users*: Ask if there are any other users who might have created Notion documents.

This should be a comma separated list of names. Remember this as the "other users".
find . -maxdepth 2 -name ".git" -type d | sed 's//.git$//' | sort

请确保:
- 列出的所有仓库都属于`getsentry` Github组织。

此输出以下称为“用户仓库”。

*事件文档*:询问用户是否要包含事件文档。

回答为是或否。如果回答为否,后续搜索将排除某些文档。

*其他用户*:询问是否有其他用户创建了相关Notion文档。

这应该是一个逗号分隔的姓名列表。将其记为“其他用户”。

Step 3

步骤3

Create a private Notion document entitled "SRED Work Summary [current year]". This document will be referred to as the Work Summary.
If a document with this name already exists, notify the user to rename the existing document and stop executing.
Ensure:
  • If the Work Summary already exists, stop execution.
创建一个标题为“SRED Work Summary [当前年份]”的私人Notion文档。该文档以下称为“工作总结”。
如果同名文档已存在,请通知用户重命名现有文档并停止执行。
请确保:
  • 如果工作总结文档已存在,停止执行。

Step 4

步骤4

The time window is Feb. 1 of the previous year until Jan. 31 of the current year Find all Github PRs created by the given github username in the time window for the user repos. If the user does not want to include incident documents, ignore any Github PRs with
INC-X
,
inc-X
in the title or description. Use either the Github MCP or the
gh
command to do this.
Find all the Notion documents the user created in the time window. If the user does not want to include incident documents, ignore any Notion Documents with
INC-XXXX
in the title. Use the Notion MCP to do this.
Find all the Linear tickets the user was assigned in the time window. If the user does not want to include incident documents, ignore any Linear tickets with
INC-XXXX
in the title. Use the Linear MCP to do this.
Ensure:
  • All the Github PRs were created or merged in the time window and was opened by the user.
  • All the Notion docs were created in the time window and were created by the user.
  • All the Linear tickets were opened or completed in the time window and were assigned to the user when they were completed.
时间范围为上一年的2月1日至当前年份的1月31日 查找用户仓库中,指定Github用户名在该时间范围内创建的所有Github PRs。 如果用户不想包含事件文档,请忽略标题或描述中包含
INC-X
inc-X
的Github PRs。 使用Github MCP或
gh
命令完成此操作。
查找用户在该时间范围内创建的所有Notion文档。 如果用户不想包含事件文档,请忽略标题中包含
INC-XXXX
的Notion文档。 使用Notion MCP完成此操作。
查找用户在该时间范围内被分配的所有Linear工单。 如果用户不想包含事件文档,请忽略标题中包含
INC-XXXX
的Linear工单。 使用Linear MCP完成此操作。
请确保:
  • 所有Github PRs均在时间范围内创建或合并,且由该用户发起。
  • 所有Notion文档均在时间范围内创建,且由该用户创建。
  • 所有Linear工单均在时间范围内创建或完成,且完成时已分配给该用户。

Step 5

步骤5

For each of the Github PRs, Notion documents and Linear tickets found in Step 4, put a link into the private document created in Step 3.
Ensure:
  • There is a link for all the Github PRs in the Work Summary
  • There is a link for all the Notion docs in the Work Summary
  • There is a link for all the Linear tickets in the Work Summary
  • DO NOT truncate the lists of links. DO NOT use shorteners like "...and 75 more". Make sure that the full set of all Github PRs, Notion documents and Linear tickets is visible in the document.
对于步骤4中找到的所有Github PRs、Notion文档和Linear工单,将链接放入步骤3中创建的私人文档中。
请确保:
  • 工作总结中包含所有Github PRs的链接
  • 工作总结中包含所有Notion文档的链接
  • 工作总结中包含所有Linear工单的链接
  • 不要截断链接列表。不要使用“...以及另外75个”之类的省略方式。确保所有Github PRs、Notion文档和Linear工单的完整链接集在文档中可见。

Step 6

步骤6

Use your own intelligence to group all the Github, Notion and Linear ticket links in the Work Summary document into projects. The format of this document is shown below.
markdown
undefined
运用你的智能,将工作总结文档中的所有Github、Notion和Linear工单链接按项目分组。文档格式如下所示。
markdown
undefined

Projects

项目

[Project Name]

[项目名称]

Summary: [X] PRs, [X] Notion docs, [X] Linear tickets
摘要: [X]个PRs, [X]个Notion文档, [X]个Linear工单

Pull Requests [X]

拉取请求 [X]

*[repository name] [Links to all the PRs]
  • [link] - [Merge date]
*[仓库名称] [所有PR的链接]
  • [链接] - [合并日期]

Notion Docs [X]

Notion文档 [X]

[Links to all the Notion docs]
  • [link] - [Creation date]
[所有Notion文档的链接]
  • [链接] - [创建日期]

Linear Tickets [X]

Linear工单 [X]

  • [link] - [Creation date]

For Github PRs, use both the title of the PR and the description of the PR for grouping.
For Notion documents, use the full document for grouping.
For Linear tickets use the title of the ticket and the description of the ticket.

Ensure:
- All the links in the file are assigned to a project.
- The file follows the format specified above.
- DO NOT truncate the lists of links. DO NOT use shorteners like "...and 75 more". Make sure that the full set of all Github PRs, Notion documents and Linear tickets is visible in the document.
  • [链接] - [创建日期]

对于Github PRs,使用PR的标题和描述进行分组。
对于Notion文档,使用完整文档内容进行分组。
对于Linear工单,使用工单的标题和描述进行分组。

请确保:
- 文件中的所有链接都已分配到某个项目。
- 文件遵循上述指定的格式。
- 不要截断链接列表。不要使用“...以及另外75个”之类的省略方式。确保所有Github PRs、Notion文档和Linear工单的完整链接集在文档中可见。

Step 7

步骤7

Search for notion documents created by the "other users". Take any that are relevant to the projects in the Work Summary and add links to those Notion documents into the Work Summary in the appropriate project.
搜索“其他用户”创建的Notion文档。将与工作总结中项目相关的文档链接添加到工作总结的对应项目中。

Step 8

步骤8

Return a link to the Work Summary Notion doc to the user.
Ensure:
  • The actual Notion document link is in the final output.
向用户返回工作总结Notion文档的链接。
请确保:
  • 最终输出中包含实际的Notion文档链接。

Resources

资源