Add test on git.#Commit

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2021-09-01 18:49:21 +02:00
committed by Guillaume de Rouville
parent c8e3755188
commit 4ad2c8e7e5
9 changed files with 171 additions and 24 deletions

View File

@@ -10,6 +10,33 @@ Git operations
import "alpha.dagger.io/git"
```
## git.#Commit
Commit & push to github repository
### git.#Commit Inputs
| Name | Type | Description |
| ------------- |:-------------: |:-------------: |
|*repository.remote* | `string` |Repository remote URL |
|*repository.PAT* | `dagger.#Secret` |Github PAT |
|*repository.branch* | `string` |Git branch |
|*name* | `string` |Username |
|*email* | `string` |Email |
|*message* | `string` |Commit message |
|*force* | `*false \| bool` |Force push options |
|*ctr.env.USER_NAME* | `string` |- |
|*ctr.env.USER_EMAIL* | `string` |- |
|*ctr.env.COMMIT_MESSAGE* | `string` |- |
|*ctr.env.GIT_BRANCH* | `string` |- |
|*ctr.env.GIT_REMOTE* | `string` |- |
### git.#Commit Outputs
| Name | Type | Description |
| ------------- |:-------------: |:-------------: |
|*hash* | `string` |Commit hash |
## git.#CurrentBranch
Get the name of the current checked out branch or tag
@@ -26,19 +53,29 @@ Get the name of the current checked out branch or tag
| ------------- |:-------------: |:-------------: |
|*name* | `string` |Git branch name |
## git.#Image
### git.#Image Inputs
_No input._
### git.#Image Outputs
_No output._
## git.#Repository
A git repository
### git.#Repository Inputs
| Name | Type | Description |
| ------------- |:-------------: |:-------------: |
|*remote* | `string` |Git remote. Example: `"https://github.com/dagger/dagger"` |
|*ref* | `string` |Git ref: can be a commit, tag or branch. Example: "main" |
|*subdir* | `*null \| string` |(optional) Subdirectory |
|*authToken* | `dagger.#Secret` |(optional) Add Personal Access Token |
|*authHeader* | `dagger.#Secret` |(optional) Add OAuth Token |
| Name | Type | Description |
| ------------- |:-------------: |:-------------: |
|*remote* | `string` |Git remote link |
|*ref* | `string` |Git ref: can be a commit, tag or branch. Example: "main" |
|*subdir* | `*null \| string` |(optional) Subdirectory |
|*authToken* | `dagger.#Secret` |(optional) Add Personal Access Token |
|*authHeader* | `dagger.#Secret` |(optional) Add OAuth Token |
### git.#Repository Outputs