-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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!: Add support for creating GitHub App with organizations #3222
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @wenked !
Please address the few minor comments.
@willnorris - since this involves scrape
, do you have any comments or concerns regarding the breaking change in this PR?
We'll see what @willnorris says, but we could alternatively have a second |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3222 +/- ##
==========================================
- Coverage 97.72% 92.94% -4.78%
==========================================
Files 153 171 +18
Lines 13390 11633 -1757
==========================================
- Hits 13085 10812 -2273
- Misses 215 727 +512
- Partials 90 94 +4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any sense on who is using this package (not many people, looking at pkg.go.dev), so I don't have strong feelings either way on the change. looks fine to me.
Co-authored-by: Glenn Lewis <[email protected]>
Co-authored-by: Glenn Lewis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @wenked !
LGTM.
Merging.
Fixes: #3210.
BREAKING CHANGE: The
CreateApp
function now requires two arguments:AppManifest
andorgName
, to support creating apps with organizations.The issue occurred because the create app URL path was only set up for creating personal GitHub apps.
My solution was to add an additional argument to the function to provide the necessary information for creating organizational GitHub Apps. The second argument,
AppConfig
, now includes configuration structs with anOwnerType
that can be either personal or organizational, and you can provide the organization name by passingOrgName
in theAppConfig
struct.For more details, see the issue: #3210.