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

New command: Assign role with administrative unit scope. Closes #5671 #5678

Conversation

MartinM85
Copy link
Contributor

Closes #5671

@martinlingstuyl
Copy link
Contributor

Great work @MartinM85, we'll review asap!

@MartinM85 MartinM85 changed the title New command: Assign role with administrative unit scope. Closed #5671 New command: Assign role with administrative unit scope. Closes #5671 Dec 11, 2023
@waldekmastykarz waldekmastykarz self-assigned this Dec 14, 2023
Copy link
Member

@waldekmastykarz waldekmastykarz left a comment

Choose a reason for hiding this comment

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

Great start! Let's do a couple adjustments before we continue

@waldekmastykarz waldekmastykarz marked this pull request as draft December 14, 2023 08:57
@MartinM85 MartinM85 marked this pull request as ready for review December 14, 2023 19:47
@waldekmastykarz
Copy link
Member

Thank you for a quick turnaround @MartinM85, I'll have another look asap

Copy link
Member

@waldekmastykarz waldekmastykarz left a comment

Choose a reason for hiding this comment

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

Hey @MartinM85, it seems like your fork got out of date and we're getting a bunch of merge conflicts when trying to rebase it. Could you please sync the latest changes from upstream main and ensure that everything is working as intended before we merge it? I appreciate your help.

@waldekmastykarz waldekmastykarz marked this pull request as draft December 24, 2023 08:42
@MartinM85
Copy link
Contributor Author

Hi @waldekmastykarz, merged with the latest main. Should be without the conflicts.

@MartinM85 MartinM85 marked this pull request as ready for review December 25, 2023 08:42
@waldekmastykarz
Copy link
Member

Hi @waldekmastykarz, merged with the latest main. Should be without the conflicts.

Thanks, I'll have a look

@MartinM85
Copy link
Contributor Author

@pnp/cli-for-microsoft-365-maintainers is there any chance to merge this before #5663? I think there will be a lot conflicts after renaming and extra work out the scope of the original ticket #5671.

@waldekmastykarz
Copy link
Member

git pull https://github.com/MartinM85/cli-microsoft365.git feature/5671-add-role-assignment-administrative-unit

Hey @MartinM85, unfortunately, I'm still getting merge conflicts when rebasing your PR. Have you followed the steps outlined in: https://github.com/pnp/cli-microsoft365/blob/main/CONTRIBUTING.md#tips

@waldekmastykarz waldekmastykarz marked this pull request as draft January 3, 2024 12:11
@MartinM85
Copy link
Contributor Author

MartinM85 commented Jan 3, 2024

git pull https://github.com/MartinM85/cli-microsoft365.git feature/5671-add-role-assignment-administrative-unit

Hey @MartinM85, unfortunately, I'm still getting merge conflicts when rebasing your PR. Have you followed the steps outlined in: https://github.com/pnp/cli-microsoft365/blob/main/CONTRIBUTING.md#tips

Hi @waldekmastykarz, I'm using TortoiseGit, but doing the same. Sync my fork main with upstream main. Then merge my local main into local feature/5671-add-role-assignment-administrative-unit and pull feature/5671-add-role-assignment-administrative-unit.

It shows me that I'm up-to-date with local main and upstream main

@MartinM85 MartinM85 marked this pull request as ready for review January 3, 2024 13:03
@martinlingstuyl
Copy link
Contributor

@MartinM85, I don't think we can merge this one first, unfortunately. The AAD-to-Entra rename must be merged as soon as possible, otherwise we'll run into more merge conflicts before long. I'll be merging it tonight, which will require you to rebase on main. Sorry for the inconvenience 😅

@waldekmastykarz
Copy link
Member

merge my local main into local feature/5671-add-role-assignment-administrative-unit and pull feature/5671-add-role-assignment-administrative-unit.

Our instructions mention rebase instead of merge. They're not quite the same. Merge adds a new merge commit merging your work with the latest changes. Rebase, brings in the latest commits in first and adds your changes on top, which is what we're doing when processing PRs and why we're getting merge conflicts.

@waldekmastykarz waldekmastykarz marked this pull request as draft January 3, 2024 13:21
@martinlingstuyl
Copy link
Contributor

By the way @MartinM85, aside from the current merge conflicts: If you need our help fixing the merge conflicts that arise from the rename: we're perfectly willing to help you out there, as it's not your fault that this PR breaks yours...

@MartinM85
Copy link
Contributor Author

MartinM85 commented Jan 3, 2024

By the way @MartinM85, aside from the current merge conflicts: If you need our help fixing the merge conflicts that arise from the rename: we're perfectly willing to help you out there, as it's not your fault that this PR breaks yours...

@martinlingstuyl I think, I can deal with merge conflicts, but main issue is that I'm merging upstream main into my fork main instead of rebasing and it causes conflicts on Waldek site. Now, I'm not sure what can be done on my side to fix it.

@martinlingstuyl
Copy link
Contributor

Yeah, because you merged in between it 's going to be rough going. If you want my advice, I'd probably try cherry picking your commits in a new branch based on main. Or just copy the file contents.

@MartinM85
Copy link
Contributor Author

Yeah, because you merged in between it 's going to be rough going. If you want my advice, I'd probably try cherry picking your commits in a new branch based on main. Or just copy the file contents.

I was thinking that after merging #5663 it would be better to create a new branch for #5678 and copy files related to #5678 and create a new PR.

https://github.com/pnp/cli-microsoft365/blob/main/CONTRIBUTING.md#tips describe a case when you create a new feature branch, but not the case when you need to rebase the feature branch to be up-to-date with upstream main.

@waldekmastykarz
Copy link
Member

describe a case when you create a new feature branch, but not the case when you need to rebase the feature branch to be up-to-date with upstream main.

That's on us, sorry. If you've got some work in progress, and want to update it with the latest changes from upstream:

  • git checkout main
  • git pull upstream main (assuming you've got remote named upstream pointing to the upstream repo)
  • git push origin main (to update the main branch of your fork with upstream, not needed, but a good habit)
  • git checkout your-feature-branch
  • git rebase main (if there are any conflicts, you'll get them here)

After resolving conflicts, run:

git push origin your-feature-branch --force (you need --force because you changed the history)

@martinlingstuyl
Copy link
Contributor

I was thinking that after merging #5663 it would be better to create a new branch for #5678 and copy files related to #5678 and create a new PR.

That's also fine!

https://github.com/pnp/cli-microsoft365/blob/main/CONTRIBUTING.md#tips describe a case when you create a new feature branch, but not the case when you need to rebase the feature branch to be up-to-date with upstream main.

Ah, yes, I see what you mean. What's missing is that you need to rebase your feature branch on the main branch after syncing main.

git switch main

# Fetch all the change from upstream
git fetch upstream

# Rebase them into your branch
git pull --rebase upstream main

git switch feature-branch

git rebase main

@MartinM85
Copy link
Contributor Author

I'm closing this PR due to too many changes in main.
New PR is here: #5755

@MartinM85 MartinM85 closed this Jan 5, 2024
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.

New command: Assign role with administrative unit scope
3 participants