-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visibility into Jenkins-readiness of instructor assignment repos #35
Comments
You may want to add methods to the Git Strategy for accessing & updating the commit/build status for a given repository. You can add those to the files in this folder: |
Commit Status API for GitHub: https://developer.github.com/v3/repos/statuses/ Build Status API for GitLab: https://docs.gitlab.com/ce/api/commits.html#post-the-build-status-to-a-commit |
Operations needed given a Repo object: Set Commit Status For example, to set the status in the rails console, we might type the following: machine_octokit.set_commit_status('ucsb-cs-test-org-1/assignment-lab00', {
:state => :pending,
:target_url => 'https://localhost:8000/',
:description => 'Test'
})
status = machine_octokit.get_commit_status('ucsb-cs-test-org-1/assignment-lab00') Note: the Octokit method you might need is this: https://octokit.github.io/octokit.rb/Octokit/Client/Statuses.html#create_status-instance_method |
You probably want to add this method to the base class git_strategy.rb:
You'll pass through an empty hash to the underlying octokit method documented o this page http://octokit.github.io/octokit.rb/Octokit/Client/Statuses.html#create_status-instance_method
For gitlab, we can just leave it alone for now, since we aren't using it yet. The "not implemented yet" error will get thrown and that's ok for now. That method comes directly from |
We also need a get_most_recent_status(repo, sha) which wraps the
method but only returns the most recent status. |
In the assignments index page for instructors, we would like to be able to know the "build status" of each assignment. This allows instructors to know whether they have properly set up their assignment repos for auto-grading.
We would like to be able to see an icon to the right of each assignment list item in the index page of the assignments view:
https://github.com/project-anacapa/course-github-org-tool/blob/feature/assignment-view/app/views/assignments/_index_instructor.html.erb#L5
The icons for each status are as follows:
PENDING == yellow hourglass
SUCCESS == green checkmark
FAILURE == red X
ERROR == red ?
The text was updated successfully, but these errors were encountered: