- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6.2k
Suggestions for issues #32327
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
          
     Merged
      
      
    
  
     Merged
                    Suggestions for issues #32327
Changes from 7 commits
      Commits
    
    
            Show all changes
          
          
            15 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      e943ddc
              
                Autocomplete issues or pull-request ids
              
              
                anbraten 1afcb06
              
                add ui
              
              
                anbraten 41778d5
              
                get issues from api
              
              
                anbraten 8957d4f
              
                enhance code
              
              
                anbraten 7371f26
              
                use utils
              
              
                anbraten 5466516
              
                improve code
              
              
                anbraten ea1b18c
              
                limit results
              
              
                anbraten f50b4eb
              
                use separate endpoint
              
              
                anbraten 546593f
              
                review
              
              
                anbraten bb3d550
              
                Merge branch 'main' into link-issue
              
              
                anbraten 573f257
              
                fixes
              
              
                anbraten 462c5ed
              
                Merge branch 'link-issue' of github.com:anbraten/gitea into link-issue
              
              
                anbraten 5f783c7
              
                rename route and filter based on permissions
              
              
                anbraten 99dc059
              
                Merge remote-tracking branch 'upstream/main' into link-issue
              
              
                anbraten 91742ec
              
                reuse type
              
              
                anbraten File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
      
      Oops, something went wrong.
      
    
  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| export type Issue = {id: number; title: string; state: 'open' | 'closed'; pull_request?: {draft: boolean; merged: boolean}}; | ||
|  | ||
| export function getIssueIcon(issue: Issue) { | ||
| if (issue.pull_request) { | ||
| if (issue.state === 'open') { | ||
| if (issue.pull_request.draft === true) { | ||
| return 'octicon-git-pull-request-draft'; // WIP PR | ||
| } | ||
| return 'octicon-git-pull-request'; // Open PR | ||
| } else if (issue.pull_request.merged === true) { | ||
| return 'octicon-git-merge'; // Merged PR | ||
| } | ||
| return 'octicon-git-pull-request'; // Closed PR | ||
| } else if (issue.state === 'open') { | ||
| return 'octicon-issue-opened'; // Open Issue | ||
| } | ||
| return 'octicon-issue-closed'; // Closed Issue | ||
| } | ||
|  | ||
| export function getIssueColor(issue: Issue) { | ||
| if (issue.pull_request) { | ||
| if (issue.pull_request.draft === true) { | ||
| return 'grey'; // WIP PR | ||
| } else if (issue.pull_request.merged === true) { | ||
| return 'purple'; // Merged PR | ||
| } | ||
| } | ||
| if (issue.state === 'open') { | ||
| return 'green'; // Open Issue | ||
| } | ||
| return 'red'; // Closed Issue | ||
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.