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

Add epim extension #17888

Merged
merged 5 commits into from
Mar 25, 2025
Merged

Add epim extension #17888

merged 5 commits into from
Mar 25, 2025

Conversation

macownersclub
Copy link
Contributor

@macownersclub macownersclub commented Mar 15, 2025

Description

Screencast

Checklist

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
- Prettify Code
- Improve Docs
- Minor improvement to the UI
- Add Option to see active assignements
- Update Docs
- Catch some graph "non-error" responses
- Initial commit
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds a new extension for managing Microsoft Entra PIM (Privileged Identity Management) roles through Raycast, enabling users to view and activate privileged roles with justification and duration settings.

  • CHANGELOG.md entries use actual dates (2025-03-14, 2025-03-13) instead of required {PR_MERGE_DATE} template string
  • "Assignements" is misspelled in CHANGELOG.md title (should be "Assignments")
  • Since this is a view command in package.json, a metadata folder with screenshots should be included
  • Consider using showFailureToast from @raycast/utils in try-catch blocks instead of manual showToast with failure style
  • The extension title "Entra Pim Role" in package.json should be consistent with "Entra PIM Role" (capitalization) in other places

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

8 file(s) reviewed, 11 comment(s)
Edit PR Review Bot Settings | Greptile

@@ -0,0 +1,13 @@
# Entra PIM Role Changelog

## [Active Assignements indicator] - 2025-03-14
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Replace ## [Active Assignements indicator] - 2025-03-14 with ## [Active Assignments indicator] - {PR_MERGE_DATE}

Suggested change
## [Active Assignements indicator] - 2025-03-14
## [Active Assignments indicator] - {PR_MERGE_DATE}

# Entra PIM Role Changelog

## [Active Assignements indicator] - 2025-03-14
- Add Option to see active assignements
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Fix spelling of 'assignments'

Suggested change
- Add Option to see active assignements
- Add Option to see active assignments

Comment on lines 8 to 9
2. Ensure that Powershell for macOS is installed.
2. Ensure that the following Powershell modules are installed.
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Duplicate numbering '2.' in installation steps

Suggested change
2. Ensure that Powershell for macOS is installed.
2. Ensure that the following Powershell modules are installed.
2. Ensure that Powershell for macOS is installed.
3. Ensure that the following Powershell modules are installed.

Comment on lines 9 to 11
2. Ensure that the following Powershell modules are installed.
* `Microsoft.Graph.Authentication`
* `Microsoft.Graph.Identity.Governance`
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Installation steps should include instructions for installing these PowerShell modules

Suggested change
2. Ensure that the following Powershell modules are installed.
* `Microsoft.Graph.Authentication`
* `Microsoft.Graph.Identity.Governance`
3. Ensure that the following Powershell modules are installed using:
```powershell
Install-Module Microsoft.Graph.Authentication
Install-Module Microsoft.Graph.Identity.Governance


## License

This extension is licensed under the MIT License
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Missing period at end of sentence

Suggested change
This extension is licensed under the MIT License
This extension is licensed under the MIT License.

{
"$schema": "https://www.raycast.com/schemas/extension.json",
"name": "epim",
"title": "Entra Pim Role",
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Title has inconsistent capitalization - 'Pim' should be 'PIM' since it's an acronym

Suggested change
"title": "Entra Pim Role",
"title": "Entra PIM Role",

"commands": [
{
"name": "epim",
"title": "Entra Pim Role",
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Command title has same inconsistent capitalization - 'Pim' should be 'PIM'

Suggested change
"title": "Entra Pim Role",
"title": "Entra PIM Role",

Comment on lines 17 to 18
"subtitle": "Activate Entra Role via PIM with Graph",
"description": "Activate Entra Role via PIM with Graph",
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Subtitle and description are identical - consider making the subtitle more concise and descriptive

target={<JustificationForm role={role} userId={userId} />}
disabled={role.isActive}
/>
{role.isActive && <Action title="Show Active Until" shortcut={{ modifiers: ["cmd"], key: "i" }} />}
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: The 'Show Active Until' action has a shortcut but no handler implementation

Suggested change
{role.isActive && <Action title="Show Active Until" shortcut={{ modifiers: ["cmd"], key: "i" }} />}
{role.isActive && <Action title="Show Active Until" onAction={() => showToast({ title: `Active until ${formatDateTime(role.endDateTime)}` })} shortcut={{ modifiers: ["cmd"], key: "i" }} />}

Comment on lines 419 to 421
title="Remaining Time"
text={{ value: role.remainingTime, color: Color.Green } || { value: "", color: Color.Green }}
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: The OR condition here will never be reached since role.remainingTime is always defined when isActive is true

Suggested change
title="Remaining Time"
text={{ value: role.remainingTime, color: Color.Green } || { value: "", color: Color.Green }}
/>
title="Remaining Time"
text={{ value: role.remainingTime, color: Color.Green }}
/>

@raycastbot raycastbot added the new extension Label for PRs with new extensions label Mar 15, 2025
@raycastbot
Copy link
Collaborator

Congratulations on your new Raycast extension! 🚀

Due to our current reduced availability, the initial review may take up to 10-15 business days

Once the PR is approved and merged, the extension will be available on our Store.

- Fix errors from PR check
- Update README with screenshots
@raycast raycast deleted a comment from greptile-apps bot Mar 20, 2025
Comment on lines +19 to +22
interface Preferences {
powershellPath: string;
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
interface Preferences {
powershellPath: string;
}

You don't need to manually set preference types as this is autogenerated in raycast-env.d.ts

@pernielsentikaer
Copy link
Collaborator

Could you show me a screencast of how this extension works? 😊

@pernielsentikaer pernielsentikaer self-assigned this Mar 20, 2025
@macownersclub
Copy link
Contributor Author

Could you show me a screencast of how this extension works? 😊

Untitled-1.mov

Copy link
Collaborator

@pernielsentikaer pernielsentikaer left a comment

Choose a reason for hiding this comment

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

Hi 👋

Looks good to me, approved 🔥

@raycastbot raycastbot merged commit b12c8db into raycast:main Mar 25, 2025
2 checks passed
Copy link
Contributor

Published to the Raycast Store:
https://raycast.com/aimebertrand/epim

@raycastbot
Copy link
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new extension Label for PRs with new extensions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants