[环境:团队服务,GIT,托管构建代理]
我想创建一个能够执行以下操作的Team Services构建定义:
执行脚本以根据仓库中的现有文件生成一些新文件
将生成的文件提交/推送回repo
我可以毫无问题地做#1.但我不知道我怎么做#2.
我发现我实际上能够从构建作业中运行git.exe.但我不确定如何将凭证传递给git.基于构建日志,它失败了,因为它试图从stdin获取用户名.
我尝试在构建定义中添加一个步骤,例如"git config --global user.name xxxx",但它仍然没有帮助.
这是一个受支持的场景吗?有什么建议?
谢谢!
编辑
我在构建脚本中尝试了以下方法:
git -c http.extraheader="AUTHORIZATION: bearer %SYSTEM_ACCESSTOKEN%" pull ...
Run Code Online (Sandbox Code Playgroud)
它似乎适用于拉等等命令.但是当我试图推动更改时,我得到以下错误:
fatal: unable to access 'https://example.visualstudio.com/SampleTeam/_git/SampleRepo/': SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054
Run Code Online (Sandbox Code Playgroud)
思考?
我正在尝试编写一个调用 Microsoft Graph API 的简单 Azure 函数。但我无法使 access_token 工作。这是我所做的:
npm install request)和实际功能:
var request = require('request');
module.exports = function (context, req) {
var token = req.headers['x-ms-token-aad-access-token'];
var reqUrl = 'https://graph.microsoft.com/v1.0/me/';
request.get(reqUrl, {'auth': {'bearer': token}}, function (err, response, msg) {
context.res = {
body: msg
};
context.done();
});
};
Run Code Online (Sandbox Code Playgroud)在单独的浏览器窗口中测试了此功能。让我正确登录 AAD。
但是从 Graph 返回的消息是:
"{
"error": { …Run Code Online (Sandbox Code Playgroud)javascript azure node.js azure-functions microsoft-graph-api
我正在尝试在我的Web应用程序中使用Office UI Fabric React组件.有没有办法改变组件的颜色或主题?例如,我尝试过这样的事情:
ReactDOM.render(
<DefaultButton
className='my-button'
text='Test Button'
/>,
document.getElementById('root')
);
Run Code Online (Sandbox Code Playgroud)
my-button是一个定义为红色背景颜色的CSS类.但实际上并没有改变任何东西.按钮背景颜色仍然是默认颜色#f4f4f4.
是否有可能改变组件的颜色?
[ 更新 ]理想情况下,我认为我想全局更改组件的主题,以便我的应用程序可以具有一致的外观和感觉.
谢谢!
I have been asked to pull data from an Excel online spreadsheet on Sharepoint into Power BI to create a dashboard - no problem, right? Well, one of the 'data points' is actually fill colour of the cell indicating status. I did some googling and managed to write an Office Script that translates the fill colour to the status and got everything to work but I was still running the Office Script manually (and it was taking 3 hours to …