Skip to content

Commit

Permalink
Document the new 'metadata-map.json' file
Browse files Browse the repository at this point in the history
  • Loading branch information
bgandon committed May 10, 2024
1 parent 401521b commit 0a6bde4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,16 @@ input. Because the base of the PR is not locked to a specific commit in versions
requested version and the metadata emitted by `get` are available to your tasks as JSON:
- `.git/resource/version.json`
- `.git/resource/metadata.json`
- `.git/resource/metadata-map.json`
- `.git/resource/changed_files` (if enabled by `list_changed_files`)

The `metadata.json` file contains an array of objects, one for each key-value
pair, with a `name` key and a `value` key. In order to support the
[`load_var` step][load_var_step], another `metadata-map.json` provides the
same informtion with a plain key-value format.

[load_var_step]: https://concourse-ci.org/load-var-step.html

The information in `metadata.json` is also available as individual files in the `.git/resource` directory, e.g. the `base_sha`
is available as `.git/resource/base_sha`. For a complete list of available (individual) metadata files, please check the code
[here](https://github.com/telia-oss/github-pr-resource/blob/master/in.go#L66).
Expand Down

0 comments on commit 0a6bde4

Please sign in to comment.