Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for automated edits to the README #415

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,14 @@ closes **go-jira** will submit the completed form. The order which **go-jira**
* **EDITOR** environment variable
* vim

To automate editing, use the `--noedit` to skip opening the editor, and pass `--override` fields as defined in `~/.jira.d/templates/edit`:

```
jira edit GOJIRA-321 --noedit --override priority=P0
Copy link

@dkirrane dkirrane May 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@darthwalsh How do you override nested/arrays fields? e.g. if you wanted to add Component2 below to the jira

fields:

  components:
    - name: Component1
    - name: Component2

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure! If you open ~/.jira.d/templates/edit there's some complicated templating logic that looks like it merges together .overrides.components with existing .fields.components? But you'd have to try to be sure.

```

To edit fields not in the default template, [customize the template](https://github.com/go-jira/jira/issues/238#issuecomment-681666211).

### Templates

**go-jira** has the ability to customize most output (and editor input) via templates. There are default templates available for all operations,
Expand Down