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

automatically assign me to the change request #551

Open
szamanr opened this issue Jan 22, 2025 · 1 comment
Open

automatically assign me to the change request #551

szamanr opened this issue Jan 22, 2025 · 1 comment
Labels
area/forge Issues heavy on dealing with Forges. contributor-friendly (Hopefully) straightforward tasks for folks looking to contribute. enhancement New feature or request

Comments

@szamanr
Copy link

szamanr commented Jan 22, 2025

hello and thank you for this tool, i've been missing graphite since switching to gitlab! 🙏

i work with a self-hosted gitlab instance. when i submit a stack, it creates merge requests, but they are not automatically assigned to me. i would like that to happen automatically, or be able to configure that.

@abhinav
Copy link
Owner

abhinav commented Jan 23, 2025

Hello! I'm happy it's working for you.

it creates merge requests, but they are not automatically assigned to me. i would like that to happen automatically, or be able to configure that.

Yeah, that's a reasonable feature to add. GitHub and GitLab both support assigning the PR/MR, so a way to assign them to the author after creation makes sense.

I think this should be opt-in—probably with a config: maybe spice.submit.assignToAuthor?

On the implementation side, this probably needs:

  • A new field in forge.SubmitChangeRequest for the assignees for a newly created PR/MR. Then, in all forge implementations:
    • GitHub: The 'createPullRequest' mutation does not support including an assignee at creation time, so we'll probably need a second API call after creation to set the assignee here. Looks like it'll be an 'addAssigneesToAssignable' mutation.
    • GitLab: Looks like the "Create MR" API supports including an assignee at creation time, so it'll be a matter of updating the parameters here.
    • shamhub, which we use for testing, will need to learn this concept. This should be straightforward.
  • The new option will be added to submitOptions to be made available to all gs * submit commands.
  • At some point during submit, if that option is set, we'll need to get information about the currently authenticated user for assignment. This might need new "whoami"-equivalent methods on all Forge implementations.
  • This information will finally be injected into SubmitChangeRequest here.

If you or someone else wants to take a stab at it, a contribution would be welcome. Otherwise, I'll poke at it if/when I have time and motivation.

@abhinav abhinav added enhancement New feature or request contributor-friendly (Hopefully) straightforward tasks for folks looking to contribute. labels Jan 23, 2025
@abhinav abhinav added the area/forge Issues heavy on dealing with Forges. label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/forge Issues heavy on dealing with Forges. contributor-friendly (Hopefully) straightforward tasks for folks looking to contribute. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants