mirror of
				https://github.com/taigrr/wtf
				synced 2025-01-18 04:03:14 -08:00 
			
		
		
		
	Merge branch 'master' into dependabot/go_modules/golang.org/x/text-0.3.3
This commit is contained in:
		
						commit
						c64277e225
					
				| @ -931,6 +931,13 @@ | ||||
|       "name": "Matt", | ||||
|       "avatar_url": "https://avatars2.githubusercontent.com/u/641427?v=4", | ||||
|       "profile": "https://github.com/mryanmurphy", | ||||
|       "contributions": [] | ||||
|     }, | ||||
|     { | ||||
|       "login": "ripienaar", | ||||
|       "name": "R.I.Pienaar", | ||||
|       "avatar_url": "https://avatars0.githubusercontent.com/u/82342?v=4", | ||||
|       "profile": "http://devco.net/", | ||||
|       "contributions": [ | ||||
|       ] | ||||
|     } | ||||
|  | ||||
							
								
								
									
										51
									
								
								.github/workflows/codeql-analysis.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								.github/workflows/codeql-analysis.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,51 @@ | ||||
| name: "Code scanning - action" | ||||
| 
 | ||||
| on: | ||||
|   push: | ||||
|   pull_request: | ||||
|   schedule: | ||||
|     - cron: '0 3 * * 3,6' | ||||
| 
 | ||||
| jobs: | ||||
|   CodeQL-Build: | ||||
| 
 | ||||
|     runs-on: ubuntu-latest | ||||
| 
 | ||||
|     steps: | ||||
|     - name: Checkout repository | ||||
|       uses: actions/checkout@v2 | ||||
|       with: | ||||
|         # We must fetch at least the immediate parents so that if this is | ||||
|         # a pull request then we can checkout the head. | ||||
|         fetch-depth: 2 | ||||
| 
 | ||||
|     # If this run was triggered by a pull request event, then checkout | ||||
|     # the head of the pull request instead of the merge commit. | ||||
|     - run: git checkout HEAD^2 | ||||
|       if: ${{ github.event_name == 'pull_request' }} | ||||
|        | ||||
|     # Initializes the CodeQL tools for scanning. | ||||
|     - name: Initialize CodeQL | ||||
|       uses: github/codeql-action/init@v1 | ||||
|       # Override language selection by uncommenting this and choosing your languages | ||||
|       # with: | ||||
|       #   languages: go, javascript, csharp, python, cpp, java | ||||
| 
 | ||||
|     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java). | ||||
|     # If this step fails, then you should remove it and run the build manually (see below) | ||||
|     - name: Autobuild | ||||
|       uses: github/codeql-action/autobuild@v1 | ||||
| 
 | ||||
|     # ℹ️ Command-line programs to run using the OS shell. | ||||
|     # 📚 https://git.io/JvXDl | ||||
| 
 | ||||
|     # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||||
|     #    and modify them (or add more) to build your code if your project | ||||
|     #    uses a compiled language | ||||
| 
 | ||||
|     #- run: | | ||||
|     #   make bootstrap | ||||
|     #   make release | ||||
| 
 | ||||
|     - name: Perform CodeQL Analysis | ||||
|       uses: github/codeql-action/analyze@v1 | ||||
| @ -2,6 +2,14 @@ | ||||
| 
 | ||||
| ## Unreleased | ||||
| 
 | ||||
| ### ⚡️ Added | ||||
| 
 | ||||
| * Weather module now supports a `useEmoji` setting, toggling the use of emoji characters in the title, by [@jonhadfield](https://github.com/jonhadfield) | ||||
| 
 | ||||
| ### 🐞 Fixed | ||||
| 
 | ||||
| * Null pointer exception fixed in VictorOps module, by [@ripienaar](https://github.com/ripienaar) | ||||
| 
 | ||||
| ## v0.31.0 | ||||
| 
 | ||||
| ### ⚡️ Added | ||||
|  | ||||
| @ -390,6 +390,7 @@ Dependency management in WTF is handled by [Go modules](https://github.com/golan | ||||
|     <td align="center"><a href="https://sam-github.github.io/"><img src="https://avatars2.githubusercontent.com/u/17607?v=4" width="48px;" alt=""/><br /><sub><b>Sam Roberts</b></sub></a><br /></td> | ||||
|     <td align="center"><a href="https://github.com/gerchardon"><img src="https://avatars0.githubusercontent.com/u/5973160?v=4" width="48px;" alt=""/><br /><sub><b>gerchardon</b></sub></a><br /></td> | ||||
|     <td align="center"><a href="https://github.com/mryanmurphy"><img src="https://avatars2.githubusercontent.com/u/641427?v=4" width="48px;" alt=""/><br /><sub><b>Matt</b></sub></a><br /></td> | ||||
|     <td align="center"><a href="http://devco.net/"><img src="https://avatars0.githubusercontent.com/u/82342?v=4" width="48px;" alt=""/><br /><sub><b>R.I.Pienaar</b></sub></a><br /></td> | ||||
|   </tr> | ||||
| </table> | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										6
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								go.sum
									
									
									
									
									
								
							| @ -161,8 +161,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs | ||||
| github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= | ||||
| github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= | ||||
| github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= | ||||
| github.com/digitalocean/godo v1.36.0 h1:eRF8wNzHZyU7/wI3De/MQgiVSWdseDaf27bXj2gnOO0= | ||||
| github.com/digitalocean/godo v1.36.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= | ||||
| github.com/digitalocean/godo v1.37.0 h1:NEj5ne2cvLBHo1GJY1DNN/iEt9ipa72CMwwAjKEA530= | ||||
| github.com/digitalocean/godo v1.37.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= | ||||
| github.com/dlclark/regexp2 v1.2.0 h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk= | ||||
| @ -696,8 +694,6 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf | ||||
| github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= | ||||
| github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= | ||||
| github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= | ||||
| github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho= | ||||
| github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | ||||
| github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= | ||||
| github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | ||||
| github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= | ||||
| @ -722,8 +718,6 @@ github.com/wtfutil/spotigopher v0.0.0-20191127141047-7d8168fe103a/go.mod h1:AlO4 | ||||
| github.com/wtfutil/todoist v0.0.2-0.20191216004217-0ec29ceda61a h1:nD8ALd4TSo+zPHK5MqQWFj01G8fMMHFfC3rWvoq/9JA= | ||||
| github.com/wtfutil/todoist v0.0.2-0.20191216004217-0ec29ceda61a/go.mod h1:YuuGLJSsTK6DGBD5Zaf3J8LSMfpEC2WtzYPey3XVOdI= | ||||
| github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= | ||||
| github.com/xanzy/go-gitlab v0.32.0 h1:tBm+OXv1t+KBsqlXkSDFz+YUjRM0GFsjpOWYOod3Ebs= | ||||
| github.com/xanzy/go-gitlab v0.32.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug= | ||||
| github.com/xanzy/go-gitlab v0.32.1 h1:eKGfAP2FWbqStD7DtGoRBb18IYwjuCxdtEVea2rNge4= | ||||
| github.com/xanzy/go-gitlab v0.32.1/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug= | ||||
| github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= | ||||
|  | ||||
| @ -20,6 +20,7 @@ type Widget struct { | ||||
| func NewWidget(app *tview.Application, settings *Settings) *Widget { | ||||
| 	widget := Widget{ | ||||
| 		TextWidget: view.NewTextWidget(app, settings.common), | ||||
| 		settings:   settings, | ||||
| 	} | ||||
| 
 | ||||
| 	widget.View.SetScrollable(true) | ||||
|  | ||||
| @ -81,5 +81,9 @@ func (widget *Widget) temperatures(cityData *owm.CurrentWeatherData) string { | ||||
| } | ||||
| 
 | ||||
| func (widget *Widget) buildTitle(cityData *owm.CurrentWeatherData) string { | ||||
| 	if widget.settings.useEmoji { | ||||
| 		return fmt.Sprintf("%s %s", widget.emojiFor(cityData), cityData.Name) | ||||
| 	} | ||||
| 
 | ||||
| 	return cityData.Name | ||||
| } | ||||
|  | ||||
| @ -24,6 +24,7 @@ type Settings struct { | ||||
| 	cityIDs  []interface{} | ||||
| 	language string | ||||
| 	tempUnit string | ||||
| 	useEmoji bool | ||||
| } | ||||
| 
 | ||||
| func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings { | ||||
| @ -34,6 +35,7 @@ func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *co | ||||
| 		cityIDs:  ymlConfig.UList("cityids"), | ||||
| 		language: ymlConfig.UString("language", "EN"), | ||||
| 		tempUnit: ymlConfig.UString("tempUnit", "C"), | ||||
| 		useEmoji: ymlConfig.UBool("useEmoji", true), | ||||
| 	} | ||||
| 
 | ||||
| 	settings.colors.current = ymlConfig.UString("colors.current", "green") | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user