Repository navigation
Implement BetaApi annotation for hub4j sdk - #1002
Conversation
| * @return true if the push to this branch is restricted via branch protection. | ||
| */ | ||
| @Preview | ||
| @Preview(Previews.LUKE_CAGE) |
There was a problem hiding this comment.
This was a miss from the preview PR caught by the new arch tests
| } | ||
|
|
||
| @Preview | ||
| @Preview(SQUIRREL_GIRL) |
There was a problem hiding this comment.
This was a miss from the preview PR caught by the new arch tests
| */ | ||
| @Deprecated | ||
| @Preview | ||
| public List<GHAsset> assets() { |
There was a problem hiding this comment.
I was unable to find anything in the Github API documentation that confirms this is a preview API.
https://developer.github.com/v3/repos/releases/#list-release-assets
| .withImportOption(new ImportOption.DoNotIncludeJars()) | ||
| .importPackages("org.kohsuke.github"); | ||
|
|
||
| private static final DescribedPredicate<JavaAnnotation<?>> previewAnnotationWithNoMediaType = new DescribedPredicate<JavaAnnotation<?>>( |
There was a problem hiding this comment.
This predicate ensures that no usages of the preview annotation will accept an empty array for the value param.
| */ | ||
| @Preview | ||
| @Deprecated | ||
| @CheckForNull |
There was a problem hiding this comment.
This method was not labeled properly. The field itself is not part of a preview API. It is only optionally present depending on the source of the data. We've already indicated the potential lack of presence with the @CheckForNull annotation.
Description
This PR introduces a
@BetaApiannotation to help differentiate Github@PreviewAPIs from hub4j beta APIs. The reasoning behind this change is based on the findings outlined in #1001. With these changes, the preview media type is now a hard requirement. Architecture tests have been added to ensure beta APIs are annotated as deprecated and that usages of preview do not allow empty arrays.Before submitting a PR:
We love getting PRs, but we hate asking people for the same basic changes every time.
master. Create your PR from that branch.mvn clean compilelocally. This may reformat your code, commit those changes.mvn -D enable-ci clean install sitelocally. If this command doesn't succeed, your change will not pass CI.When creating a PR: