-
Notifications
You must be signed in to change notification settings - Fork 4.1k
fix(amplify-alpha): clarify GitHub repository configuration #34139
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
base: main
Are you sure you want to change the base?
Conversation
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.
The pull request linter fails with the following errors:
❌ Fixes must contain a change to an integration test file and the resulting snapshot.
If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed, add Clarification Request
to a comment.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #34139 +/- ##
==========================================
+ Coverage 83.98% 84.00% +0.01%
==========================================
Files 120 121 +1
Lines 6976 6984 +8
Branches 1178 1179 +1
==========================================
+ Hits 5859 5867 +8
Misses 1005 1005
Partials 112 112
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
repository: '<repo>', | ||
oauthToken: SecretValue.secretsManager('my-github-token'), | ||
owner: '<github-username>', | ||
repository: '<repository-name>', // Just the repository name, NOT the full repository URL |
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.
since this is alpha, so safer for breaking changes.
prop 'repository' is misleading as we see in the bug reported.
Cant we parse repository value passed and if it matches a github url use that or extract the repo-name from the url. Documentation is great but we can do the heavy lift here.
* | ||
* Either `accessToken` or `oauthToken` must be specified if `repository` | ||
* is sepcified. | ||
* Either `accessToken` (GitHub) or `oauthToken` (other providers) must be specified |
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.
Should there be a validation to assert this assumption?
Issue # (if applicable)
Closes #25658.
Reason for this change
This PR addresses issue #25658 by improving the documentation for the AWS Amplify Alpha module to clarify how to properly configure GitHub repositories.
Description of changes
Enhanced documentation in
SourceCodeProviderConfig
to clearly explain the following:repository
property should contain only the repository name, not the full URLhttps://github.com/${owner}/${repository}
oauthToken
(legacy) andaccessToken
(personal access token) for backward compatibilityaccessToken
is the recommended method for GitHub repositories for feature parity with Amplify CreateApp API<user>
to<github-username>
for owner field<repo>
to<repository-name>
for repository fieldThese changes maintain backward compatibility while providing clearer guidance for new users, addressing the confusion that led to issue #25658.
Describe any new or updated permissions being added
N/A
Description of how you validated changes
Verified with example app that both authentication methods work as expected. Additionally, added a unit test for creating an app with access token.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license