Fill out README.md
This commit is contained in:
70
README.md
70
README.md
@@ -1,23 +1,71 @@
|
||||
# Project Name
|
||||
[](https://quay.io/repository/avanier/gitea-resource)
|
||||
|
||||
TODO: Write a project description
|
||||
# gitea-resource
|
||||
|
||||
A Concourse resource to interact with Gitea.
|
||||
|
||||
## Installation
|
||||
|
||||
TODO: Describe the installation process
|
||||
```yaml
|
||||
resource_types:
|
||||
- name: gitea-pr
|
||||
type: registry-image
|
||||
source:
|
||||
repository: quay.io/avanier/gitea-resource
|
||||
tag: latest-pr
|
||||
|
||||
resrouces:
|
||||
- name: some-repo-pr
|
||||
type: gitea-pr
|
||||
source:
|
||||
access_token: ((my_cred.token))
|
||||
repo: some-repo
|
||||
owner: some_user_or_org
|
||||
hostname: privatehost.example
|
||||
port: 443 # default, optional
|
||||
insecure: false # default, optional, true uses http instead of https
|
||||
skip_ssl_verification: false # default, optional, ignore invalid certificates
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
TODO: Write usage instructions
|
||||
### `check`
|
||||
|
||||
## Contributing
|
||||
This resource is opinionated, and does not allow you to track every commit on
|
||||
every PR. All it does for now is allow you to know when new PRs are created, and
|
||||
it returns the PR number as a ref.
|
||||
|
||||
1. Create your feature branch: `git checkout -b feature/my-new-feature`
|
||||
2. Commit your changes: `git commit -am 'Add some feature'`
|
||||
3. Push to the branch: `git push origin my-new-feature`
|
||||
4. Submit a pull request :D
|
||||
### `in`
|
||||
|
||||
## Credits
|
||||
When you `get` a ref, the resource will provide the raw Gitea API payload, and
|
||||
the Concourse metadata for that PR as the following files:
|
||||
|
||||
TODO: Write credits
|
||||
```plaintext
|
||||
some-repo-pr/pr.json
|
||||
some-repo-pr/metadata.json
|
||||
```
|
||||
|
||||
The intent is to parse this with `jq` in a separate task to get the branch, and
|
||||
template a pipeline for every PR with the [`fly-resource`][fly-resource]. It's
|
||||
the only way to avoid PR race conditions.
|
||||
|
||||
[fly-resource]: https://github.com/troykinsella/concourse-fly-resource
|
||||
|
||||
### `out`
|
||||
|
||||
`noop`
|
||||
|
||||
## FAQ
|
||||
|
||||
- **I'd like to set the CI status for those PRs.** It's an incoming feature. I
|
||||
organized my code to be able to have a single codebase to do all the
|
||||
operations on Gitea. Right now only listing and querying PRs is implemented,
|
||||
but that's why the `base` image is separate from the `pr` image. I'll
|
||||
eventually probably implement `singlepr` and `release`. The [`pr`][pr-image] image only
|
||||
has one extra layer which puts the right commands in the `$PATH`.
|
||||
|
||||
[pr-image]: ./Dockerfile.pr
|
||||
|
||||
## Issues
|
||||
|
||||
<https://todo.sr.ht/~avanier/gitea-resource-issue-tracker>
|
Reference in New Issue
Block a user