-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Conversation
"Missing projectId body parameter.", code=status.HTTP_400_BAD_REQUEST | ||
) | ||
try: | ||
project = Project.objects.get(id=request.data["projectId"], organization=organization) |
There was a problem hiding this comment.
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"), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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/" |
There was a problem hiding this comment.
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')} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
736e873
to
3aa2777
Compare
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