Skip to content

Commit

Permalink
rename draft -> wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bramhaag committed Jan 29, 2024
1 parent 0e8365d commit 15a33a9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions modules/structs/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ const (

// PullRequestMeta PR info if an issue is a PR
type PullRequestMeta struct {
HasMerged bool `json:"merged"`
Merged *time.Time `json:"merged_at"`
IsDraft bool `json:"draft"`
HasMerged bool `json:"merged"`
Merged *time.Time `json:"merged_at"`
IsWorkInProgress bool `json:"wip"`
}

// RepositoryMeta basic repository information
Expand Down
4 changes: 2 additions & 2 deletions services/convert/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ func toIssue(ctx context.Context, issue *issues_model.Issue, getDownloadURL func
}
if issue.PullRequest != nil {
apiIssue.PullRequest = &api.PullRequestMeta{
HasMerged: issue.PullRequest.HasMerged,
IsDraft: issue.PullRequest.IsWorkInProgress(ctx),
HasMerged: issue.PullRequest.HasMerged,
IsWorkInProgress: issue.PullRequest.IsWorkInProgress(ctx),
}
if issue.PullRequest.HasMerged {
apiIssue.PullRequest.Merged = issue.PullRequest.MergedUnix.AsTimePtr()
Expand Down
8 changes: 4 additions & 4 deletions templates/swagger/v1_json.tmpl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions web_src/js/components/ContextPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export default {
icon() {
if (this.issue.pull_request !== null) {
if (this.issue.state === 'open') {
if (this.issue.pull_request.draft === true) {
return 'octicon-git-pull-request-draft'; // Draft PR
if (this.issue.pull_request.wip === true) {
return 'octicon-git-pull-request-draft'; // WIP PR
}
return 'octicon-git-pull-request'; // Open PR
} else if (this.issue.pull_request.merged === true) {
Expand All @@ -46,8 +46,8 @@ export default {
color() {
if (this.issue.pull_request !== null) {
if (this.issue.pull_request.draft === true) {
return 'grey'; // Draft PR
if (this.issue.pull_request.wip === true) {
return 'grey'; // WIP PR
} else if (this.issue.pull_request.merged === true) {
return 'purple'; // Merged PR
}
Expand Down

0 comments on commit 15a33a9

Please sign in to comment.