Azure Repos pull request UI size info, etc - azure-repos

Does the Azure Repos web app have a way to show code change size info for a pull request? It would be helpful to see, say, count of files changed and number of lines of code changed.

Related

Is it a good idea to get user data from local storage and not from API?

I need to show logged in user's profile image in the header. But I don't want to call API on every page where header stands. Is it a good idea to store current user information in local storage? So I can immediately get profile image and display in the header without an extra network traffic.
If you want to always get it from the local storage, then how do you want to make sure that they are up to date? I think that's one of the problems which single page applications try to solve it.

Saving data on phone in a Cordova app

I am making a mobile app using Cordova and I need to save some sensitive and not so sensitive data inside the phone. I am a bit lost on what is the best way to do it.
I need to save:
A JSON web-token (for authentication).
A response from server (I save this to populate my page in case the GET request fails).
Coordinates information when user is logging data to the app (for later upload to a server from with in the app). These will be many separate logs, and can be large in size for local storage ~5-10 MB.
Till now i have been successfully saving everything I need to the local storage but I don't think that is the correct way to do it. So that is why I need some help in deciding what is the best course to take from security point of view.
Saving server response is just for better UI experience and static in size so I guess local storage is a good option to use.
But web-tokens and GPS logs is sensitive information and I dont want to keep it in the local storage as it is accessible from outside the app.
What other options do I have?
Cordova still doesn't have encrypted storage.
Is saving to files a good approach? This here says that data contained inside cordova.file.applicationStorageDirectory is private to the app.So can I use it to save the logs and the token?
The plugin also lists the file systems for Android and iOS and lists which of those are private.
I am currently working with android phones but want to extend the app to iOS later. I have never worked with file systems and caches before so I am a bit lost.

Instagram api sandbox

I today get Instagram api and add my website live,
I see write:
Client Status: Sandbox Mode GO LIVE
I can't click on ''GO LIVE'' button why ?
You would need to start a submission for approval to go live, though:
Feeds for websites won't be approved; these will remain in sandbox mode and be limited to 500 requests per hour and 20 images. This doesn't sound like much especially for large clients, but if you cache your responses, it's not a problem.
The main confusion is because they have made it sound like every app/feed has to be approved and out of sandbox mode to work, where as the reality is that only fully functioning apps for phones, or a widget plugin really ever need to be.
You will no longer be able to display feeds based on hashtags, only a users own photo's. By getting a client to be a sandbox user, is how you can access their feed without their login information.
Older apps/feeds will need to be updated to use the new code before June or they may stop working.
It's mainly to stop apps hammering instagram's servers for unlimited requests on any hashtag/users they like.
Here is an example of how to fetch and cache images using WordPress's 'set_transient' - you will need to use a loop to output the data.
WordPress Instagram Gist
Here is the relevant piece of information in the dev docs:
Here are some examples of scenarios that will not be approved:
To display content for a personal website. If you are a developer and you want to showcase Instagram content on a website, then you do not need to submit your app for review. By using a client in sandbox mode, you will still be able to access the last 20 media of any sandbox user that grants you permission.
One-off projects. If you are an agency building websites or other integrations, note that we don't grant permissions to clients created for one-off projects. If you are interested in building a product, platform, or widget that will be used as a service across multiple projects, then you may submit a single client_id that you can use across multiple projects.
To use a widget. If you are installing a widget for your website, then you do not need to submit for review. Some widgets may ask you to create a new client id, but you do not need to submit it for review for the widget to work. Your client can remain in sandbox mode and the widget will have access to your last 20 media.
Hope that helps clear some confusion.

Dropbox web hook on file added?

My application currently utilises an integration with the Dropbox API. The purpose of which is to allow clients to put certain documents into a dedicated folder in the Apps/My_App_Name/ directory, my application then periodically polls the folder to see if anything has been added and if a document is found it will automatically move it into the client's document management area within my application.
At the moment there are approx 300 users (and counting) who have their Dropbox accounts synced with me in this way. I believe I am doing something very inefficient here, but essentially my application polls all 300 accounts to see if a file has been added. This happens every 10 minutes but I'm having to widen this interval as more accounts are added to prevent an overlap. Each time I poll all accounts, usually I'd find only 1 or 2 out of those 300 who have new documents.
My question therefore is.. Is there a method within the Dropbox API to post a Web Hook or notification of some sort only when a client adds a file to that Dropbox folder? This could then trigger my application to poll only that account and save a whole load of resources on my side.
Additional Information:
Platform: ASP.NET C#
Wrapper: SharpBox
I contacted Dropbox and they have confirm that currently (15th March 2013) they do not have a web-hook or notification system for when users upload files. They did however indicate that this is something they are looking to add in the future.
UPDATE 19th February 2014
Great News! Dropbox recently announced WebHooks:
If you're interested in helping us out, just click through to fill out
your information, and we'll be in touch:
https://dropboxapi.wufoo.com/forms/dropbox-webhooks-api-beta-feedback-contact-info
Happy Dropboxing!
Dropbox now offers webhooks so that you can get notifies when a file is added
https://www.dropbox.com/developers/blog/90/announcing-dropbox-webhooks

How to retrieve Salesforce file attachment limit via API?

Salesforce attachment file size is officially limited to 5MB (doc) but if requested they can increase this limit on a one to one cases.
My question: Can I retrieve this newly allowed file size limit using the API.
Context: Non-Profits are applying for grants via a web portal (.NET), all data is stored in Salesforce. They are asked to attach files. We read the file size they try to upload and send an error message if it exceeds 5MB as it will not be accepted by Salesforce. This is to avoid having them wait for few minutes to upload to only be told that the file size is too large. We would like to update our code so that it allows files bigger than 5MB if Salesforce allows it. Can we retrieve this information via the API?
Thank you!
You can call the getUserInfo() function in the SOAP API, part of the returned data includes the field orgAttachmentFileSizeLimit (this appears to be missing from the docs, but is in the WSDL)
I'll recommend going away from Salesforce to store files, more if you'r expecting to hit limits, also there is a limit on the space for storing organization wide, a useful service like Amazon S3 would be very useful, you can then attach the S3 url to your record in case it is needed, it'll be also available for external applications without having to load your org's api consumption.