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: support private projects for event search #7884

Merged
merged 5 commits into from
Aug 15, 2024
Merged

Conversation

sjaanus
Copy link
Contributor

@sjaanus sjaanus commented Aug 15, 2024

Adds private projects support for event search. Unit test should cover the usecases.

Copy link

vercel bot commented Aug 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 15, 2024 9:00am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Aug 15, 2024 9:00am

Copy link
Contributor

github-actions bot commented Aug 15, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

expect(result).toBe('IS:project1');
});

it('should throw an error if no projects match and not throw an error', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Huh? What's this test supposed to say? Something like this?

Suggested change
it('should throw an error if no projects match and not throw an error', () => {
it('should throw an error if no projects match', () => {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, fixed

mode: 'all',
};

const projectParam = 'IS:project1,IS:project3';
Copy link
Contributor

Choose a reason for hiding this comment

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

Project param the query parameter in the URL, right? If you have multiple projects, it's formatted as an IS_ANY_OF:, not as a concatenated list of IS (e.g. https://sandbox.getunleash.io/enterprise/history?query=&limit=25&offset=0&project=IS_ANY_OF%3A61ab6557353d%2Candreas_test).

We should probably use the same kinda query string, yeah?

(Side note: how does the API handle multiples of the same query param? E.g. "project=IS_ANY_OF:a,b&project=IS:c"?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Side note, not sure actually, but it is not supposed to be used that way, and only doable via API.

@sjaanus sjaanus merged commit 183a9fc into main Aug 15, 2024
9 of 11 checks passed
@sjaanus sjaanus deleted the private-project-events branch August 15, 2024 09:51
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.

2 participants