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 elements from repositories under different org / owner #74

Closed
aeneasr opened this issue Apr 12, 2022 · 11 comments · Fixed by #142
Closed

Add elements from repositories under different org / owner #74

aeneasr opened this issue Apr 12, 2022 · 11 comments · Fixed by #142

Comments

@aeneasr
Copy link

aeneasr commented Apr 12, 2022

As noted in the README

NOTE: This Action (currently) only supports auto-adding Issues to a Project which lives in the same organization as your target Repository.

and also raised on the feedback forums (without ack from GH) it is not possible to add issues to a board that belongs to a different org. As this is possible in the UI, it appears to be a validation issue in the GraphQL API.

My question / suggestion is, will this ever become possible? It would be a huge relief in managing multi-org set ups that popular open source ecosystems use, such as Ory.

Thanks! :)

@mattcosta7
Copy link
Contributor

It's definitely on the radar to support across the board. I don't have a timeline for this yet

timrogers added a commit to timrogers/add-to-project that referenced this issue Jun 30, 2022
At present, this Action only supports adding an issue or pull
request to a project in the *same organization* as the issue or
pull request itself.

This removes that limitation. If the issue/pull request and
project have different owners, then instead of directly
creating a project item, we will instead create a "draft issue"
which will be added to the board.

Fixes actions#74.
timrogers added a commit to timrogers/add-to-project that referenced this issue Jun 30, 2022
At present, this Action only supports adding an issue or pull
request to a project in the *same organization* as the issue or
pull request itself.

This removes that limitation. If the issue/pull request and
project have different owners, then instead of directly
creating a project item, we will instead create a "draft issue"
which will be added to the board.

Fixes actions#74.
timrogers added a commit to timrogers/add-to-project that referenced this issue Jun 30, 2022
At present, this Action only supports adding an issue or pull
request to a project in the *same organization* as the issue or
pull request itself.

This removes that limitation. If the issue/pull request and
project have different owners, then instead of directly
creating a project item, we will instead create a "draft issue"
which will be added to the board.

Fixes actions#74.
timrogers added a commit to timrogers/add-to-project that referenced this issue Jul 15, 2022
At present, this Action only supports adding an issue or pull
request to a project in the *same organization* as the issue or
pull request itself.

This removes that limitation. If the issue/pull request and
project have different owners, then instead of directly
creating a project item, we will instead create a "draft issue"
which will be added to the board.

Fixes actions#74.
@aeneasr
Copy link
Author

aeneasr commented Jul 21, 2022

Awesome!!!

@aeneasr
Copy link
Author

aeneasr commented Jul 21, 2022

Unfortunately I can't get it to work:

Bildschirmfoto 2022-07-21 um 16 28 39

Was it closed in error?

@aaronshurley
Copy link

@aeneasr can you try v0.3.0? I believe that's when this capability was released.

@aeneasr
Copy link
Author

aeneasr commented Jul 26, 2022

Yes, perfect, thank you!

One problem remains though - this doesn't work when people push from forks as the token is not available on the fork due to security settings. Is there a way to work around this (preferrably not making the token available to forks :D )?

@aaronshurley
Copy link

Yes, perfect, thank you!

No problem!

One problem remains though - this doesn't work when people push from forks as the token is not available on the fork due to security settings. Is there a way to work around this (preferrably not making the token available to forks :D )?

I'm going to leave this one for @mattcosta7

@mattcosta7
Copy link
Contributor

Yes, perfect, thank you!

One problem remains though - this doesn't work when people push from forks as the token is not available on the fork due to security settings. Is there a way to work around this (preferrably not making the token available to forks :D )?

@aeneasr would you mind writing that up in a bit more detail on a new issue so we can look into what/if any updates we can make here to support it?

@aaronshurley
Copy link

I just tried this out and received a "Creating draft issue in project" message. However, I don't see any (draft) issues in the project. Am I missing something? For additional context, this project is currently private but I didn't think that would matter as long as the token has access.

image

@mattcosta7
Copy link
Contributor

I just tried this out and received a "Creating draft issue in project" message. However, I don't see any (draft) issues in the project. Am I missing something? For additional context, this project is currently private but I didn't think that would matter as long as the token has access.

image

It uses a quirk of the API to make a draft - which is immediately converted to a real issue since it's added by URL (which is the same way projects work when copying/pasting a link to an issue/pr into a project)

@aaronshurley
Copy link

Hmm... but I'm still not seeing the issue show up in my project. I turned on debugging but there wasn't anything useful. Anything that I can try to dig into this?

@aeneasr
Copy link
Author

aeneasr commented Jul 27, 2022

I can confirm that the issues are correctly added to the board for me, even though the repository is in org A and the project board in org B

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 a pull request may close this issue.

3 participants