docs: improve config example
separate sections for required/optional config settings Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
This commit is contained in:
		
							parent
							
								
									37ba136b5c
								
							
						
					
					
						commit
						8315fee398
					
				
							
								
								
									
										44
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										44
									
								
								README.md
									
									
									
									
									
								
							@ -31,11 +31,36 @@ steps:
 | 
			
		||||
    userid: '@drone-bot@matrix.org'
 | 
			
		||||
    password:
 | 
			
		||||
      from_secret: drone-bot-pw
 | 
			
		||||
    template: '${DRONE_REPO} ${DRONE_COMMIT_SHA} ${DRONE_BUILD_STATUS}'
 | 
			
		||||
    markdown: 'yes'
 | 
			
		||||
    template: |
 | 
			
		||||
      `${DRONE_REPO}` build #${DRONE_BUILD_NUMBER} status: **${DRONE_BUILD_STATUS}**
 | 
			
		||||
 | 
			
		||||
      ${DRONE_PULL_REQUEST_TITLE}](${DRONE_COMMIT_LINK})
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Configuration settings
 | 
			
		||||
 | 
			
		||||
### Required
 | 
			
		||||
 | 
			
		||||
* `roomid` *(required)*
 | 
			
		||||
 | 
			
		||||
    ID of matrix chat room to send messages to (ID, not alias).
 | 
			
		||||
 | 
			
		||||
* `userid` *(required)*
 | 
			
		||||
 | 
			
		||||
    Matrix user ID on homeserver to send message as (ID, not username).
 | 
			
		||||
 | 
			
		||||
* `password` *(required)*
 | 
			
		||||
 | 
			
		||||
    Password to use for authenticating the user set with `userid`. Either a
 | 
			
		||||
    password or an access token is required.
 | 
			
		||||
 | 
			
		||||
* `accesstoken` *(required)*
 | 
			
		||||
 | 
			
		||||
    Access token to use for authentication instead of `password`. Either an
 | 
			
		||||
    access token or a password is required.
 | 
			
		||||
 | 
			
		||||
### Optional
 | 
			
		||||
 | 
			
		||||
* `allowed_attrs` *(default:* [`DEFAULT_ALLOWED_ATTRS`]*)*
 | 
			
		||||
 | 
			
		||||
@ -54,11 +79,6 @@ steps:
 | 
			
		||||
    external resources when the generated HTML is displayed, notably `img`
 | 
			
		||||
    is not included.
 | 
			
		||||
 | 
			
		||||
* `accesstoken`
 | 
			
		||||
 | 
			
		||||
    Access token to use for authentication instead of `password`. Either an
 | 
			
		||||
    access token or a password is required.
 | 
			
		||||
 | 
			
		||||
* `deviceid`
 | 
			
		||||
 | 
			
		||||
    Device ID to send with access token.
 | 
			
		||||
@ -108,15 +128,6 @@ steps:
 | 
			
		||||
    Only environment variables matching any of the given names or patterns will
 | 
			
		||||
    be available as valid placeholders in the message template.
 | 
			
		||||
 | 
			
		||||
* `password`
 | 
			
		||||
 | 
			
		||||
    Password to use for authenticating the user set with `userid`. Either a
 | 
			
		||||
    password or an access token is required.
 | 
			
		||||
 | 
			
		||||
* `roomid` *(required)*
 | 
			
		||||
 | 
			
		||||
    ID of matrix chat room to send messages to (ID, not alias).
 | 
			
		||||
 | 
			
		||||
* `template` *(default:* `${DRONE_BUILD_STATUS}`*)*
 | 
			
		||||
 | 
			
		||||
    The message template. Valid placeholders (example: `${DRONE_REPO}`) will be
 | 
			
		||||
@ -126,9 +137,6 @@ steps:
 | 
			
		||||
    See this [reference] for environment variables available in drone.io CI
 | 
			
		||||
    pipelines.
 | 
			
		||||
 | 
			
		||||
* `userid` *(required)*
 | 
			
		||||
 | 
			
		||||
    ID of user on homeserver to send message as (ID, not username).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
[`DEFAULT_ALLOWED_ATTRS`]: https://github.com/SpotlightKid/drone-matrixchat-notify/blob/master/matrixchat-notify.py#L28
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user