Skip to content

Confluence multiple pages #42

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

Merged
merged 9 commits into from
Jan 7, 2025
Merged

Conversation

martindstone
Copy link
Contributor

Background

Add the ability to see multiple Confluence pages linked to an entity

This PR

This PR adds the ability to link multiple Confluence pages to a Cortex entity

Checklists

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

Copy link
Contributor

@cristinabuenahora cristinabuenahora left a comment

Choose a reason for hiding this comment

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

Mostly just nits around code readability

);

const entityPages = useMemo((): EntityPageI[] => {
if (!entityDefinition) return [];
Copy link
Contributor

Choose a reason for hiding this comment

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

Readability nits:

Suggested change
if (!entityDefinition) return [];
if (!entityDefinition) {
return [];
}

Comment on lines 40 to 41
const entityPages: EntityPageI[] = [];
if (Array.isArray(entityDefinition.info?.["x-cortex-confluence"]?.pages)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

And some spacing for readability:

Suggested change
const entityPages: EntityPageI[] = [];
if (Array.isArray(entityDefinition.info?.["x-cortex-confluence"]?.pages)) {
const entityPages: EntityPageI[] = [];
if (Array.isArray(entityDefinition.info?.["x-cortex-confluence"]?.pages)) {

Comment on lines 49 to 50
}
if (entityDefinition.info?.["x-cortex-confluence"]?.pageID) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
}
if (entityDefinition.info?.["x-cortex-confluence"]?.pageID) {
}
if (entityDefinition.info?.["x-cortex-confluence"]?.pageID) {

Comment on lines 82 to 84
if (isLoading) return <Loading />;
if (!baseConfluenceUrl) return <Instructions />;
if (errorStr) return <Notice>{errorStr}</Notice>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here for adding {} around return

@martindstone martindstone merged commit 3a46524 into master Jan 7, 2025
2 checks passed
@martindstone martindstone deleted the confluence-multiple-pages branch January 7, 2025 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants