selain / ghsp2ofer Goto Github PK
View Code? Open in Web Editor NEWyet another Github bot
License: MIT License
yet another Github bot
License: MIT License
The bot try to copy file excluded in gitignore
and exception happen
(ghsp2ofer) C:\ghsp2ofer-adile>python bot.py
auto commit.
Traceback (most recent call last):
File "bot.py", line 80, in addfiles_commit_push_remote
shutil.copy2(src, dest)
File "c:\Python36\lib\shutil.py", line 257, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "c:\Python36\lib\shutil.py", line 121, in copyfile
with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'cloned_repos\\ghsp2ofer
\\locale\\sv\\LC_MESSAGES\\p1tr.mo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "bot.py", line 147, in <module>
bot.run()
File "bot.py", line 134, in run
self.random_auto_commit()
File "bot.py", line 115, in random_auto_commit
message=message)
File "bot.py", line 86, in addfiles_commit_push_remote
repo.git.add(file)
File "C:\py36_venv\ghsp2ofer\lib\site-packages\gitpy
thon-2.1.8-py3.6.egg\git\cmd.py", line 551, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "C:\py36_venv\ghsp2ofer\lib\site-packages\gitpy
thon-2.1.8-py3.6.egg\git\cmd.py", line 1010, in _call_process
return self.execute(call, **exec_kwargs)
File "C:\py36_venv\ghsp2ofer\lib\site-packages\gitpy
thon-2.1.8-py3.6.egg\git\cmd.py", line 821, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
cmdline: git add locale\sv\LC_MESSAGES\p1tr.mo
stderr: 'The following paths are ignored by one of your .gitignore files:
locale/sv/LC_MESSAGES/p1tr.mo
Use -f if you really want to add them.'
设定的等待间隔现在是乱数常态分配
比方我个 600分到 1200分是随机机率相同出现其中的一个时间
是不可做进阶的设定调整
比方说 600分到 1000分出现机率是70% 1000~1200分是30%
这样在行为表现上看来才更加不规律
Instead of simple random commit behavior. it might be good idea to mimic other users. Just follow active or passive contributors and take same commit intervals.
Will this bot be able to create pull requests to upstream repository automatically ?
If the bot.py executed by administrator in command line, the commit author will not be that set in settings.py
. Instead it shows xxx
.
example : xxx add files: p1tr.plugins.textutils.TextutilsPlugin.html p1tr.lib.core… …
it should be: Pyrrhadile add files: p1tr.plugins.textutils.TextutilsPlugin.html p1tr.lib.core… …
使用 settings.py DEFAULT_COMMIT_TOOL = 'PyGithub'
執行時會遇到
Traceback (most recent call last):
File "bot.py", line 147, in <module>
bot.run()
File "bot.py", line 134, in run
self.random_auto_commit()
File "bot.py", line 122, in random_auto_commit
message=message)
File "bot.py", line 62, in remote_addfiles_commit
data = input_file.read()
UnicodeDecodeError: 'cp950' codec can't decode byte 0xb5 in position 1794: illeg
al multibyte sequence
無法正確進行
根據源碼該是 minutes 不是小時
下次預計醒來時間的提示也是錯的
Plan to update
DEFAULT_REPO = ''
as
DEFAULT_REPOS = ['',]
and possibly strategy designed to select repos ?
Got BadCredentialsException when runnng the bot...
Traceback (most recent call last):
File "bot.py", line 165, in <module>
bot.run()
File "bot.py", line 146, in run
root_dir=settings.DEFAULT_CLONE_ROOT_DIR)
File "bot.py", line 47, in repo_clone
repo = self.github.get_user().get_repo(name=repo_name)
File "C:\ghsp2ofer\lib\site-packages\github\AuthenticatedUser.py", line 876, in get_repo
"/repos/" + self.login + "/" + name
File "C:\ghsp2ofer\lib\site-packages\github\AuthenticatedUser.py", line 213, in login
self._completeIfNotSet(self._login)
File "C:\ghsp2ofer\lib\site-packages\github\GithubObject.py", line 251, in _completeIfNotSet
self._completeIfNeeded()
File "C:\ghsp2ofer\lib\site-packages\github\GithubObject.py", line 255, in _completeIfNeeded
self.__complete()
File "C:\ghsp2ofer\lib\site-packages\github\GithubObject.py", line 260, in __complete
self._url.value
File "C:\ghsp2ofer\lib\site-packages\github\Requester.py", line 169, in requestJsonAndCheck
return self.__check(*self.requestJson(verb, url, parameters, headers, input, cnx))
File "C:\ghsp2ofer\lib\site-packages\github\Requester.py", line 182, in __check
raise self.__createException(status, responseHeaders, output)
github.GithubException.BadCredentialsException: 401 {'message': 'Bad credentials', 'documentation_url': 'https://developer.github.com/v3'}
Any suggestion ?
which can easily observe status and healthy of each registered bot. further, commands and tuning can be made through this panel.
錯誤訊息
Cmd('git') failed due to: exit code(1)
cmdline: git pull -v origin
stderr: 'fatal: unable to access 'https://pczheng:Gsdasf%e#aasdf&[email protected]/pc
zheng/wondaponda.git/': Port number ended with 'G''
密碼是錯誤時的密碼 目前已修改
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.