英文:
Can you set a value in the ScriptProperty of a AppScript Project before pushing via clasp?
问题
I would like to set a value programmatically in the ScriptProperty before I push it via clasp but I could not find a way to do it.
I also could not find any API to set it from outside.
英文:
I would like to set a value programmatically in the ScriptProperty before I push it via clasp but I could not find a way to do it.
I also could not find any API to set it from outside.
答案1
得分: 1
抱歉,我只提供代码部分的翻译:
"I'm afraid this is not possible. The Google Apps Script API does not support managing or retrieving information from script properties yet, therefore when using the API you won't be able to see that info.
Because of that when cloning projects using clasp the result is the same, that information will not appear anywhere, hence it can't be managed.
The only available option so far to manage this information is using the setProperties() method from the Properties class from Apps Script itself, but they can't be managed locally before being pushed with clasp in case your end goal was to push changes to the project including all the properties values. The only way is to push the changes to the script and then push the update to the values.
I would still consider this a good idea. I would recommend posting this as a feature request in the Google's issue tracker to see if they can make it possible in the near future.
References:
英文:
I'm afraid this is not possible. The Google Apps Script API does not support managing or retrieving information from script properties yet, therefore when using the API you won't be able to see that info.
Because of that when cloning projects using clasp the result is the same, that information will not appear anywhere, hence it can't be managed.
The only available option so far to manage this information is using the setProperties() method from the Properties class from Apps Script itself, but they can't be managed locally before being pushed with clasp in case your end goal was to push changes to the project including all the properties values. The only way is to push the changes to the script and then push the update to the values.
I would still consider this a good idea. I would recommend posting this as a feature request in the Google's issue tracker to see if they can make it possible in the near future.
References:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论