-
Notifications
You must be signed in to change notification settings - Fork 3
User entity and user group user relationship #4
Conversation
8a2b234
to
7464ba0
Compare
7464ba0
to
8d76aad
Compare
|
||
| Source Entity `_type` | Relationship `_class` | Target Entity `_type` | | ||
| ---------------------- | --------------------- | --------------------- | | ||
| `sonarqube_user_group` | **HAS** | `sonarqube_user` | |
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.
Are there any relationships between users/groups and projects?
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.
I don't think there is directly I'd have to investigate a bit more. There is a permissions page (the api docs for it look incomplete though) and I'm thinking that's what we want.
p: String(page), | ||
ps: String(ITEMS_PER_PAGE), |
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.
Are p
and ps
jut aliases for page
and per_page
?
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.
Sonarqube uses p/ps when I wrote the test you recommended I noticed it wasn't working as I expected. 🤦♂️
export function createProjectEntity(project: SonarqubeProject): Entity { | ||
return createIntegrationEntity({ | ||
entityData: { | ||
source: project, | ||
assign: { | ||
_key: project.key, | ||
_key: createProjectEntityIdentifier(project.key), |
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.
I'm a little confused. Why did we need to add the sonarqube-project:
prefix back here?
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.
The minimum characters is 10 for a key and you can be under 10 characters on the project name.
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.
Ah gotcha. Thanks.
I was looking for the minimum character length earlier... where did you end up finding it?
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.
When I switched to toMatchGraphObjectSchema
it yelled about the 10 character minimum.
if (!userGroupEntity) { | ||
throw new IntegrationMissingKeyError( | ||
`Expected user group with key to exist (key=${userGroupEntityId})`, | ||
); | ||
} |
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.
Now's probably a good time to mention that you'll probably see some integrations that throw if jobState.findEntity
doesn't find an entity, and others that just silently continue. Keep this in mind as you work through integrations because it will be great to gain a consensus on the right approach over time.
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.
Awesome - thanks for the changes!
No description provided.