Skip to content
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

Removed pinned nature of repo for now. #92

Merged
merged 28 commits into from
Jun 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6713d69
Copy/adaptation of Sunsetting controller
SeanKilleen Jun 22, 2020
eb63607
Update viewmodel, view contents, github service
SeanKilleen Jun 22, 2020
e60c9c4
more
SeanKilleen Jun 22, 2020
85f2c75
Better form controls
SeanKilleen Jun 22, 2020
7c199fe
fix checkbox positioning
SeanKilleen Jun 22, 2020
85046a8
Data annotations for subjects
SeanKilleen Jun 22, 2020
409dbef
Remove some unneeded annotations
SeanKilleen Jun 22, 2020
7fc1ded
Mark as multiline
SeanKilleen Jun 22, 2020
a9629d5
Increase size of body field
SeanKilleen Jun 22, 2020
073f2e1
Additional zones and submit button
SeanKilleen Jun 22, 2020
df2adaf
previews on keyup
SeanKilleen Jun 22, 2020
98ca034
remove console logs
SeanKilleen Jun 22, 2020
bc39a77
Validation
SeanKilleen Jun 22, 2020
a453702
oops
SeanKilleen Jun 22, 2020
a6fffe6
Attempt of mass issue creator using SemaphoreSlim
SeanKilleen Jun 23, 2020
fb686ad
Register IMassIssueCreator
SeanKilleen Jun 23, 2020
9ccdd0c
update language
SeanKilleen Jun 23, 2020
3384142
try/catch
SeanKilleen Jun 23, 2020
604760d
Update field names
SeanKilleen Jun 23, 2020
8981a2e
fix previews
SeanKilleen Jun 23, 2020
c96ed3e
oops
SeanKilleen Jun 23, 2020
350f74f
update logging
SeanKilleen Jun 23, 2020
bc49075
fix
SeanKilleen Jun 23, 2020
0248c4a
Extract classes / interfaces
SeanKilleen Jun 23, 2020
e10f548
R# cleanup
SeanKilleen Jun 23, 2020
5b569ee
Removed pinned item field
SeanKilleen Jun 23, 2020
54519d4
unrelated R# cleanup
SeanKilleen Jun 23, 2020
36fd157
Merge branch 'main' into 89_issues-across-repositories
SeanKilleen Jun 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletions src/Konmaripo.Web.Tests.Unit/Helpers/RepositoryBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,7 @@ namespace Konmaripo.Web.Tests.Unit.Helpers
{
public class RepositoryBuilder
{
const string DummyString = "";
const long DummyLong = 0;
const int DummyInt = 0;
private readonly DateTimeOffset _dummyDateTimeOffset;

private string _repositoryName = "";
private int _starCount = 0;
private bool _isArchived = false;
private int _forkCount = 0;
private int _openIssueCount = 0;
private DateTimeOffset _createdDate = DateTimeOffset.Now;
private DateTimeOffset _updatedDate = DateTimeOffset.Now;
private long _repoId = 0;
private string _description = "";
private bool _isPrivate = false;
private DateTimeOffset _pushedDate = DateTimeOffset.Now;
private string _repoUrl = "";

private Faker<Repository> _faker = new Faker<Repository>();

public RepositoryBuilder()
{
_dummyDateTimeOffset = DateTimeOffset.Now;
}
private readonly Faker<Repository> _faker = new Faker<Repository>();

public RepositoryBuilder WithName(string repoName)
{
Expand Down
8 changes: 2 additions & 6 deletions src/Konmaripo.Web/Controllers/MassIssuesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,15 @@ public class MassIssue
[DataType(DataType.MultilineText)]
public string IssueBody { get; set; }

[Display(Name = "Pin Issue?")]
public bool ShouldBePinned { get; set; }

// ReSharper disable once UnusedMember.Global
public MassIssue()
{
// this is here because the model binding uses it
}
public MassIssue(string issueSubject, string issueBody, bool shouldBePinned)
public MassIssue(string issueSubject, string issueBody)
{
IssueSubject = issueSubject;
IssueBody = issueBody;
ShouldBePinned = shouldBePinned;
}
}
public class MassIssueViewModel
Expand Down Expand Up @@ -73,7 +69,7 @@ public async Task<IActionResult> Index()
{
var remainingRequests = _gitHubService.RemainingAPIRequests();
var nonArchivedRepos = await NonArchivedReposCount();
var issue = new MassIssue(string.Empty, string.Empty, false);
var issue = new MassIssue(string.Empty, string.Empty);

var vm = new MassIssueViewModel(issue, nonArchivedRepos, remainingRequests);

Expand Down
7 changes: 0 additions & 7 deletions src/Konmaripo.Web/Views/MassIssues/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@
@Html.TextAreaFor(x => x.MassIssue.IssueBody, htmlAttributes: new { @class = "form-control", rows = 10 })
@Html.ValidationMessageFor(x => x.MassIssue.IssueBody, null, htmlAttributes: new { @class = "text-danger" })
</div>

<div class="form-check">
@Html.CheckBoxFor(x => x.MassIssue.ShouldBePinned, htmlAttributes: new { @class = "form-check-input" })
@Html.LabelFor(x => x.MassIssue.ShouldBePinned, htmlAttributes: new { @class = "form-check-label" })
@Html.ValidationMessageFor(x=>x.MassIssue.ShouldBePinned, null, htmlAttributes: new { @class = "text-danger" })
</div>

</div>

<div>
Expand Down