https://github.com/h1alexbel/ghquota
JUnit extension that won't run your tests if request quota in GitHub is exceeded
https://github.com/h1alexbel/ghquota
github junit-extension junit5 testing
Last synced: about 1 month ago
JSON representation
JUnit extension that won't run your tests if request quota in GitHub is exceeded
- Host: GitHub
- URL: https://github.com/h1alexbel/ghquota
- Owner: h1alexbel
- License: mit
- Created: 2024-01-17T14:29:50.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-21T19:49:38.000Z (7 months ago)
- Last Synced: 2024-10-22T05:05:46.781Z (7 months ago)
- Topics: github, junit-extension, junit5, testing
- Language: Java
- Homepage:
- Size: 51.8 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://www.elegantobjects.org)
[](https://www.rultor.com/p/h1alexbel/ghquota)
[](https://www.jetbrains.com/idea/)[](https://github.com/h1alexbel/ghquota/actions/workflows/mvn.yml)
[](https://search.maven.org/artifact/io.github.h1alexbel/ghquota)
[](https://javadoc.io/doc/io.github.h1alexbel/ghquota)[](https://hitsofcode.com/view/github/h1alexbel/ghquota)
[](https://github.com/h1alexbel/ghquota)
[](http://www.0pdd.com/p?name=h1alexbel/ghquota)
[](https://github.com/h1alexbel/ghquota/blob/master/LICENSE.txt)JUnit extension that won't run your tests if request quota in GitHub is exceeded.
**How to use**. All you need is this (get the latest version [here](https://search.maven.org/artifact/io.github.h1alexbel/ghquota)):
Maven:
```xmlio.github.h1alexbel
ghquota
test```
Gradle:
```groovy
dependencies {
testCompile 'io.github.h1alexbel:ghquota:'
}
``````java
import java.net.URL;
import io.github.h1alexbel.ghquota.QuotaIsFine;@Test
@ExtendWith(QuotaIsFine.class)
void readsContentInRealGitHub() {
new URL("api.github.com/repos/h1alexbel/ghquota").getContent();
}
```We don't want this unit test to be executed when [GitHub Quota API](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28) is exceeded.
The Quota execution condition will prevent JUnit5 from executing the test when you are out of requests.## How to Contribute
It's a Java project.
You will need to install Maven 3.8.7+ Java 17+.Fork repository, make changes, send us a [pull request](https://www.yegor256.com/2014/04/15/github-guidelines.html).
We will review your changes and apply them to the `master` branch shortly,
provided they don't violate our quality standards. To avoid frustration,
before sending us your pull request please run full Maven build:```bash
$ mvn clean install
```