Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(codeowners): CodeOwners header CTA hook #28602

Merged
merged 6 commits into from
Sep 20, 2021
Merged

Conversation

NisanthanNanthakumar
Copy link
Contributor

@NisanthanNanthakumar NisanthanNanthakumar commented Sep 15, 2021

Objective:

Hooks for the CodeOwners CTA in getsentry. Also created a Request to Add Codeowners button for all members.

Required for https://github.com/getsentry/getsentry/pull/6259

UI

request to add codeowners file

codeowners request email

@NisanthanNanthakumar NisanthanNanthakumar requested review from a team and scefali September 15, 2021 18:25
"Missing projectId body parameter.", code=status.HTTP_400_BAD_REQUEST
)
try:
project = Project.objects.get(id=request.data["projectId"], organization=organization)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NisanthanNanthakumar If this is always tired to single project, why isn't this a project endpoint instead of an organization endpoint? It will automatically handle looking up the project.

for recipient in recipients:
msg = MessageBuilder(
**{
"subject": _("A team member is asking to setup Sentry's Code Owners"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NisanthanNanthakumar Nit: I think it should be set up instead of setup as the latter is a noun

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scefali ahh TIL!

"organization_name": organization.name,
"project_name": project.name,
"codeowners_url": absolute_uri(
f"/settings/{organization.slug}/projects/{project.slug}/ownership/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NisanthanNanthakumar you should add a referrer query param so that we know when they set up code owners, they came from this email

priority="primary"
data-test-id="add-codeowner-request-button"
>
{t('Request to Add CODEOWNERS File')}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NisanthanNanthakumar in SaaS, will members see two different buttons to request someone to to set up code owners?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scefali yea that was in the original design

@NisanthanNanthakumar NisanthanNanthakumar deleted the API-2088 branch September 20, 2021 23:21
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants