diff --git a/my-notes.txt b/my-notes.txt new file mode 100644 index 0000000..481bb8d --- /dev/null +++ b/my-notes.txt @@ -0,0 +1,34 @@ + + +## These are the user stories + + + 1. Engineer Alice makes branch "search-experiment" + 2. Alice sets up a project for "search-experiment" using this tool + 3. Engineer Bob makes further changes in master + 4. Testers start working on the "search-experiment" project + + ## why are the testers looking at the search-experiment project in the first place rather than the master branch + + +## the problem + + + + +## what I need to do: + +I need to edit the tool that I have been provided, in order to: + + [front-end] be able to specify the branch in a particular project + + [back-end] use the github api to compare a project with master + + [front-end] indicate if a project is up to date or not + + [the gist] make sure that the branch is up to date with master before testers work on it. + + + +Check the API to see if the branch is up to date with master +If not up to date, then give warning or disallow testers from working on the branch diff --git a/src/gitaccess.js b/src/gitaccess.js new file mode 100644 index 0000000..b8d4afb --- /dev/null +++ b/src/gitaccess.js @@ -0,0 +1,105 @@ +var request = new XMLHttpRequest(); +request.open('get', 'https://api.github.com/users/andrewdonato') +request.send() + + +$(document).ready(function() { + // This is called after the document has loaded in its entirety + // This guarantees that any elements we bind to will exist on the page + // when we try to bind to them + + // See: http://docs.jquery.com/Tutorials:Introducing_$(document).ready() + + makeGitRequest(); + +}); + + +var makeGitRequest = function(){ + $('.githubaccess').on('submit', function(event){ + + event.preventDefault(); + + $('.githubdata').html('

Followers: '+followersnum+' - Following: '+followingnum+'
Repos: '+reposnum+'
No repos!
Repos List: