- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 456
 
Release 1.20.0 | Plugin 4.5.0 #3269
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
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            1693 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      950a7f5
              
                Merge pull request #3499 from Flow-Launcher/clear_cache_freeze_page
              
              
                Jack251970 980b792
              
                Wrap operation in one class
              
              
                Jack251970 0d61908
              
                Support multiple topmost records
              
              
                Jack251970 af087fb
              
                Support multiple topmost records storage
              
              
                Jack251970 845c331
              
                Remove the bag from dictionary if the bag is empty
              
              
                Jack251970 07f44f2
              
                Add code comments
              
              
                Jack251970 0673d07
              
                Improve code comments & Make classes internal
              
              
                Jack251970 4ecef47
              
                Code quality
              
              
                Jack251970 c49b3b7
              
                Fix TryTake may remove the wrong element
              
              
                Jack251970 58b9f0c
              
                Improve remove logic
              
              
                Jack251970 7103c8d
              
                Mark old data as obsolete
              
              
                Jack251970 b25777b
              
                Use ConcurrentQueue to storage the data sequence & Put latter record …
              
              
                Jack251970 1cf264a
              
                Add code comments
              
              
                Jack251970 8bb96d7
              
                Fix copy to clipboard STA thread issue & Support retry for copy & Asy…
              
              
                Jack251970 62e1252
              
                Use BackToQueryResults for code quality
              
              
                Jack251970 b119785
              
                Do not query when back from the context menu
              
              
                Jack251970 f935d5f
              
                Improve code comments
              
              
                Jack251970 247272c
              
                Do not query when expanding builtin shortcuts
              
              
                Jack251970 aa0f9b2
              
                Update name
              
              
                Jack251970 6a4fdcb
              
                Merge branch 'dev' into empty_query
              
              
                Jack251970 3089928
              
                Support home query interface
              
              
                Jack251970 0f09fea
              
                Make async home query to be feature interface
              
              
                Jack251970 17a0834
              
                Support query for plugins with home query interface
              
              
                Jack251970 54994dd
              
                Initialize home query when window is loaded
              
              
                Jack251970 e9ef26a
              
                Change related setting names
              
              
                Jack251970 e833333
              
                Add ui in general page
              
              
                Jack251970 a2a8c50
              
                Merge pull request #3503 from Flow-Launcher/do_not_query_when_back_fr…
              
              
                jjw24 d6704ed
              
                Support history items
              
              
                Jack251970 f2f4ebf
              
                Support home state change & Add ui
              
              
                Jack251970 96bb62a
              
                Refresh interface when Home Page is changed
              
              
                Jack251970 13cfbe5
              
                Check query results
              
              
                Jack251970 4500f1d
              
                Fix history items context menu issue
              
              
                Jack251970 19d7059
              
                Add empty & global query for home page
              
              
                Jack251970 4ed1dc3
              
                Fix topmost issue in home page
              
              
                Jack251970 35e4bfc
              
                Improve code quality
              
              
                Jack251970 ccb1bac
              
                Merge branch 'dev' into empty_query
              
              
                Jack251970 2ab007b
              
                Fix typos
              
              
                Jack251970 fe25764
              
                Merge branch 'empty_query' of https://github.com/Jack251970/Flow.Laun…
              
              
                Jack251970 eaea38c
              
                Fix typos
              
              
                Jack251970 78f606f
              
                Fix typos
              
              
                Jack251970 72bd1e6
              
                Remove code comments with issues
              
              
                Jack251970 0d9fb29
              
                Improve code quality
              
              
                Jack251970 67facb8
              
                Use non-async version
              
              
                Jack251970 21d6ec2
              
                Use null to distinguish between home query and global query
              
              
                Jack251970 28b8cb6
              
                Improve distinguish between home query and global query
              
              
                Jack251970 51fb151
              
                Add more debug log info for query
              
              
                Jack251970 1973163
              
                Improve log info
              
              
                Jack251970 e4ecea0
              
                Merge pull request #3509 from Flow-Launcher/mainvm_more_log
              
              
                Jack251970 135b9b5
              
                Merge branch 'dev' into empty_query
              
              
                Jack251970 b9aa5a8
              
                Change variable name for code quality
              
              
                Jack251970 2713c5b
              
                Add code comments
              
              
                Jack251970 41211e8
              
                Improve code comments
              
              
                Jack251970 16404bc
              
                Improve log information
              
              
                Jack251970 36a4f41
              
                Do not need to clear the result when last and current query are home …
              
              
                Jack251970 0882378
              
                Add Glyph for history items & topmost items
              
              
                Jack251970 7083849
              
                Remove unused codes
              
              
                Jack251970 6799b87
              
                Merge pull request #3399 from Jack251970/empty_query
              
              
                jjw24 b1a48e2
              
                Improve code quality
              
              
                Jack251970 639a5ae
              
                Dispose _updateSource when creating new one & Use _updateToken instea…
              
              
                Jack251970 265fd9c
              
                Add update source lock
              
              
                Jack251970 b156afe
              
                Revert "Add update source lock"
              
              
                Jack251970 2672512
              
                Dispose the old CancellationTokenSource atomically to avoid races
              
              
                Jack251970 788cb3c
              
                Revert "Dispose the old CancellationTokenSource atomically to avoid r…
              
              
                Jack251970 deb0c21
              
                Remove unused initialization value
              
              
                Jack251970 297643c
              
                Revert all changes as master branch
              
              
                Jack251970 2d2f7de
              
                Merge pull request #3513 from Flow-Launcher/fix_result_missing
              
              
                Jack251970 29f94d6
              
                Fix startup flicker
              
              
                Jack251970 2fdab61
              
                Merge pull request #3521 from Flow-Launcher/startup_flicker
              
              
                Jack251970 c64f3df
              
                Merge branch 'dev' into multiple_topmost
              
              
                Jack251970 7c8a437
              
                fix clearing of results logic & minor adjustment to results update (#…
              
              
                jjw24 0c7d0e9
              
                Support copy file name
              
              
                Jack251970 315de2b
              
                Adjust margin in appearance page
              
              
                Jack251970 4e6a07c
              
                Check spelling workflow ignore PRs targeting dev branch
              
              
                jjw24 99a7081
              
                fix typo
              
              
                jjw24 ac37e41
              
                Merge pull request #3528 from Flow-Launcher/spell_check_ignore_dev
              
              
                jjw24 25d985b
              
                Fix Homepage with triggers history results on arrow up
              
              
                Jack251970 fde6b2d
              
                Merge pull request #3527 from Flow-Launcher/appearance_page_adjust
              
              
                Jack251970 af5ff43
              
                update comment
              
              
                jjw24 1b2b49a
              
                Merge pull request #3529 from Flow-Launcher/home_page_history
              
              
                jjw24 6ed5308
              
                Fix null origin query issue
              
              
                Jack251970 0e6741c
              
                Improve code quality
              
              
                Jack251970 31c18b8
              
                Merge pull request #3530 from Flow-Launcher/origin_query_null_issue
              
              
                Jack251970 1775c0f
              
                New Crowdin updates (#3430)
              
              
                jjw24 63aabd5
              
                Merge pull request #3526 from Flow-Launcher/copy_file_name
              
              
                Jack251970 71b6cb2
              
                Fix sound effect issue after sleep or hiberation
              
              
                Jack251970 ea4360a
              
                Merge pull request #3532 from Flow-Launcher/sound_effect_sleep_issue
              
              
                Jack251970 165e498
              
                Fix exception when deleteing temp files
              
              
                Jack251970 4931a14
              
                Validate the cache directory before loading all bookmarks
              
              
                Jack251970 d2e63ab
              
                Merge pull request #3535 from Flow-Launcher/temp_file_delete
              
              
                Jack251970 ed14826
              
                Do not show error message for initialization if plugin is already dis…
              
              
                Jack251970 b96a69a
              
                Fix Window Positioning with Multiple Montiors
              
              
                Jack251970 7509a86
              
                Use skip message for failed initialization when plugin is already dis…
              
              
                Jack251970 810f7bb
              
                Add disable information
              
              
                Jack251970 58f8099
              
                Fix results context menu display issue
              
              
                Jack251970 fa350dd
              
                Add code comments
              
              
                Jack251970 8e7e173
              
                Add code comments
              
              
                Jack251970 03b558c
              
                Fix typos
              
              
                Jack251970 a73ff5f
              
                update comment
              
              
                jjw24 93a9a92
              
                Fix typos
              
              
                Jack251970 63a9770
              
                Merge branch 'results_context_menu_display' of https://github.com/Flo…
              
              
                Jack251970 a88f65a
              
                Merge pull request #3536 from Flow-Launcher/error_message
              
              
                Jack251970 e0ac6d5
              
                Improve Program plugin delete button logic
              
              
                Jack251970 284729a
              
                Improve message noticification
              
              
                Jack251970 a099935
              
                Fix message
              
              
                Jack251970 204d1d2
              
                Improve string keys
              
              
                Jack251970 e961ffa
              
                Disable auto restart after plugin install by default
              
              
                Jack251970 4b8bd92
              
                Merge pull request #3540 from Flow-Launcher/auto_start
              
              
                Jack251970 86a3b0b
              
                Merge pull request #3538 from Flow-Launcher/results_context_menu_display
              
              
                jjw24 7023f83
              
                Merge pull request #3537 from Flow-Launcher/fix_right_top_position
              
              
                Jack251970 c1ba81e
              
                Merge pull request #3500 from Flow-Launcher/multiple_topmost
              
              
                Jack251970 da77085
              
                Fix logic & Improve code quality
              
              
                Jack251970 f0aa285
              
                Add theme change handler to refresh frame on application theme change
              
              
                onesounds 1e51bdc
              
                Unsubscribe from theme change event to prevent memory leaks
              
              
                onesounds c128a66
              
                Manage handle in dispose
              
              
                Jack251970 f29ccb3
              
                Merge branch '250514-FixColorSchemeChanging' of https://github.com/on…
              
              
                Jack251970 a75553f
              
                Merge pull request #3543 from onesounds/250514-FixColorSchemeChanging
              
              
                onesounds 8325963
              
                Fix size changed width issue
              
              
                Jack251970 8522d78
              
                Merge pull request #3544 from Flow-Launcher/width-issue
              
              
                Jack251970 54c949b
              
                Merge pull request #3539 from Flow-Launcher/program_plugin_delete_logic
              
              
                Jack251970 e417a1d
              
                Add dynamic font family to SettingWindow
              
              
                onesounds c591011
              
                Merge pull request #3545 from onesounds/250515-FixCardFont
              
              
                onesounds 57dccce
              
                Fix setting window navigation update issue & Check view model null in…
              
              
                Jack251970 1a67c89
              
                Fix component initialization issue
              
              
                Jack251970 5b17fad
              
                Fix duplicated value change
              
              
                Jack251970 d0e799b
              
                Fix double navigation issue
              
              
                Jack251970 ad94eba
              
                Fix possible issue in welcome pages
              
              
                Jack251970 e80d191
              
                Merge pull request #3547 from Flow-Launcher/setting_window_navigation…
              
              
                jjw24 7e3de02
              
                initialize position before InitializeComponent
              
              
                Jack251970 07ac325
              
                Improve code comments
              
              
                Jack251970 bb25c53
              
                Merge pull request #3549 from Flow-Launcher/setting_window_position
              
              
                Jack251970 050c2cb
              
                Refactor OpenDirectory method to improve path handling and streamline…
              
              
                onesounds b5bbd9f
              
                Refactor OpenDirectory method to standardize parameter naming and imp…
              
              
                onesounds 003df04
              
                add dedicated clear result indicator for query and non-query usage
              
              
                jjw24 b4955f7
              
                add subscriber for show history result toggle in settings
              
              
                jjw24 2941e03
              
                add logging and method summaries
              
              
                jjw24 50fced9
              
                remove async warning
              
              
                jjw24 073594f
              
                formatting
              
              
                jjw24 0b44097
              
                fix encapsulation for show results
              
              
                jjw24 7399d11
              
                Add whitespace for if
              
              
                Jack251970 b5a17b4
              
                Improve logic
              
              
                Jack251970 95eaa79
              
                Improve code logic
              
              
                Jack251970 87d11c0
              
                Remove code comments
              
              
                Jack251970 ac8a979
              
                Merge pull request #3552 from onesounds/250517-FixZombieExplorer
              
              
                jjw24 8aed36e
              
                New Crowdin updates (#3531)
              
              
                jjw24 f38bf67
              
                add publish to Chocolatey dispatch event
              
              
                jjw24 ec7ab00
              
                fix typo
              
              
                jjw24 60de423
              
                Merge pull request #3554 from Flow-Launcher/add_chocolatey_publish_on…
              
              
                jjw24 2770c6a
              
                Merge branch 'dev' into fix_result_clearing_nonquery
              
              
                jjw24 3abb2f0
              
                Merge pull request #3553 from Flow-Launcher/fix_result_clearing_nonquery
              
              
                jjw24 b878532
              
                unify plugin versions to flow main version
              
              
                jjw24 94cec8a
              
                move plugin version bump to build step
              
              
                jjw24 2b9529d
              
                set all of plugins' version to default 1.0.0
              
              
                jjw24 037b800
              
                Add file manager path validation and error handling in SelectFileMana…
              
              
                onesounds b4a3e06
              
                Merge pull request #3558 from Flow-Launcher/unify_plugin_versions
              
              
                jjw24 2c7fb93
              
                Add error handling and validation for custom file manager paths
              
              
                onesounds cc80221
              
                Version bump for release
              
              
                jjw24 aadfde0
              
                Add tips for file manager usage and improve error messages
              
              
                onesounds 94b0f2e
              
                Merge branch 'dev' into 250520-FixFilesConfig
              
              
                onesounds f262263
              
                Add hyperlink to learn more about file manager usage in settings dialog
              
              
                onesounds 3fa9259
              
                Merge remote-tracking branch 'origin/250520-FixFilesConfig' into 2505…
              
              
                onesounds c0eaf1c
              
                Remove unused function
              
              
                Jack251970 3beb4e9
              
                Use api functions instead
              
              
                Jack251970 af4375b
              
                Improve code quality
              
              
                Jack251970 d23f88d
              
                Make sure vertically center
              
              
                Jack251970 5626ab7
              
                Log information when failed to execute
              
              
                Jack251970 89fdd48
              
                typo
              
              
                jjw24 6e36b08
              
                Use api functions instead
              
              
                Jack251970 152ad2f
              
                Remove setter for observable collection & Add blank line for code qua…
              
              
                Jack251970 d0f0edb
              
                Merge branch '250520-FixFilesConfig' of https://github.com/onesounds/…
              
              
                Jack251970 6ce2cf9
              
                Refactor with MVVM
              
              
                Jack251970 5578daa
              
                Remove files tip button
              
              
                Jack251970 45b8181
              
                Fix potential issue with index boundary in Delete command
              
              
                Jack251970 9a692a8
              
                Add whitespace
              
              
                Jack251970 07f77f0
              
                move calls to viewmodel
              
              
                jjw24 e2d50cd
              
                update wording
              
              
                jjw24 41b9cd4
              
                move code to viewmodel
              
              
                jjw24 ac61469
              
                Merge pull request #3561 from onesounds/250520-FixFilesConfig
              
              
                onesounds edae432
              
                Add FocusQueryTextBox method to set focus on the query text box in Ma…
              
              
                onesounds 3718ae5
              
                Improve code quality & Improve code comments
              
              
                Jack251970 8aae92e
              
                Fix main window null when checking exitting
              
              
                Jack251970 2beab53
              
                Merge pull request #3568 from onesounds/20250522-FixWinR
              
              
                Jack251970 087a45c
              
                New Crowdin updates (#3559)
              
              
                jjw24 dc0454b
              
                Merge pull request #3570 from Flow-Launcher/exitting_null
              
              
                Jack251970 2026bb7
              
                Merge pull request #3560 from Flow-Launcher/version_bump
              
              
                jjw24 90ad72c
              
                Diff Time in Created At and LastModifiedAt
              
              
                01Dri 35e71c6
              
                Relative Date checkbox
              
              
                01Dri 02ddcaa
              
                Function name changed to GetRelativeDate
              
              
                01Dri a711ce4
              
                Translate pt br
              
              
                01Dri b2f5713
              
                Fix crash on ×32 devices
              
              
                Jack251970 f6103b1
              
                Relative Date -> File Age
              
              
                01Dri d726455
              
                Relative Date - FileAge
              
              
                01Dri 2ff0fc8
              
                Disable ShowFileAgeInPreviewPanel by default
              
              
                onesounds 03d3c92
              
                Fix blnak lie
              
              
                Jack251970 65e0a02
              
                Revert changes in pt-br.xaml
              
              
                Jack251970 0f718e5
              
                Code quality
              
              
                Jack251970 62d7256
              
                Support transaltion for preview information
              
              
                Jack251970 6333cd3
              
                Merge pull request #3579 from 01Dri/display-the-File-age-in-preview-p…
              
              
                onesounds de74387
              
                Fix argument null exception when updating plugin directories for erro…
              
              
                Jack251970 0d785d1
              
                Fix typos
              
              
                Jack251970 0258955
              
                Log a warning when encountering an empty Name
              
              
                Jack251970 9e666f9
              
                Log a warning when encountering an empty AssemblyName
              
              
                Jack251970 50780db
              
                Fix build issue
              
              
                Jack251970 47878f3
              
                Fix file explorer invocation to ensure correct file selection behavior
              
              
                onesounds 41c5b36
              
                Enhance OpenDirectory method to support folder opening and file selec…
              
              
                onesounds 086aeab
              
                Use PInvoke to improve code quality
              
              
                Jack251970 eb69ce9
              
                Add url comments
              
              
                Jack251970 6144d4a
              
                Merge pull request #3590 from onesounds/250527-FixOpenContaining
              
              
                onesounds 489699c
              
                add update PR script
              
              
                jjw24 f79a2d2
              
                change to issues endpoint
              
              
                jjw24 55b69c6
              
                get milestone dynamically
              
              
                jjw24 0b616d8
              
                add pr update
              
              
                jjw24 c33e9de
              
                Update delete confirmation message for folder link in context menu
              
              
                onesounds ebb74da
              
                Refactor key press handling in MessageBoxEx to improve result assignm…
              
              
                onesounds 05486ea
              
                Add OpenHistory hotkey functionality and binding
              
              
                onesounds e6eb8c0
              
                Revert key press handling
              
              
                onesounds 7c718ce
              
                Add code comments
              
              
                Jack251970 94a7dbc
              
                Merge pull request #3596 from onesounds/250530-AdjustDeleteMessageBox
              
              
                onesounds d159adb
              
                Merge pull request #3597 from onesounds/250530-HistoryHotkey
              
              
                onesounds abef617
              
                Change delete confirmation dialog from Yes/No to OK/Cancel
              
              
                onesounds 31cba99
              
                Merge pull request #3598 from onesounds/DeleteByESC
              
              
                onesounds 70fcc84
              
                Use ResultContextMenu instead of ContextMenu
              
              
                Jack251970 43227d8
              
                Merge pull request #3600 from Flow-Launcher/context_menu
              
              
                Jack251970 6235914
              
                Update Advanced title and reset button content to use dynamic resources
              
              
                onesounds 03c0ea8
              
                Use try-catch to resolve SendAsync issue
              
              
                Jack251970 b69a8ee
              
                Merge pull request #3603 from onesounds/250601-FixAdvancedTitleToString
              
              
                onesounds a68c69b
              
                Merge pull request #3604 from Flow-Launcher/resolve_task_exception
              
              
                Jack251970 93731d8
              
                combine into single api call
              
              
                jjw24 a06cb43
              
                Use new model to clear results & Fix clear existing results when usin…
              
              
                Jack251970 72639fa
              
                formatting
              
              
                jjw24 f83f702
              
                formatting
              
              
                jjw24 124130a
              
                formatting
              
              
                jjw24 ef8f43f
              
                add workflow for update release pr
              
              
                jjw24 88a2ba4
              
                fix typo
              
              
                jjw24 4e22e20
              
                install requests library
              
              
                jjw24 f72eae2
              
                pip install silent
              
              
                jjw24 a9a212e
              
                add trigger only run when pr exists
              
              
                jjw24 a52ceb1
              
                add exit when more than two milestones found
              
              
                jjw24 f7e473c
              
                typo
              
              
                jjw24 a1a4ef6
              
                Fix comment typos
              
              
                Jack251970 dfbc847
              
                remove dev source branch condition
              
              
                jjw24 ef84add
              
                minor adjustments
              
              
                jjw24 dd2560e
              
                Merge pull request #3607 from Flow-Launcher/add_release_pr_workflow
              
              
                jjw24 ae76c41
              
                Merge pull request #3584 from Flow-Launcher/null_for_error_plugins
              
              
                Jack251970 00b61f3
              
                Merge pull request #3581 from Flow-Launcher/get_window_long
              
              
                Jack251970 db97288
              
                New Crowdin updates (#3574)
              
              
                jjw24 a3b0b2d
              
                Use dynamic resource instead of binding
              
              
                Jack251970 dbba91a
              
                Merge pull request #3610 from Flow-Launcher/title_binding
              
              
                Jack251970 61e740b
              
                New translations en.xaml (Vietnamese) (#3609)
              
              
                jjw24 af6e28d
              
                version bump Plugin
              
              
                jjw24 367bf2c
              
                Merge pull request #3612 from Flow-Launcher/bump_plugin_project
              
              
                jjw24 File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
          The table of contents is too big for display.
        
      Diff view
Diff view
There are no files selected for viewing
  
    
      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,215 @@ | ||
| from os import getenv | ||
| 
     | 
||
| import requests | ||
| 
     | 
||
| 
     | 
||
| def get_github_prs(token: str, owner: str, repo: str, label: str = "", state: str = "all") -> list[dict]: | ||
| """ | ||
| Fetches pull requests from a GitHub repository that match a given milestone and label. | ||
| 
     | 
||
| Args: | ||
| token (str): GitHub token. | ||
| owner (str): The owner of the repository. | ||
| repo (str): The name of the repository. | ||
| label (str): The label name. | ||
| state (str): State of PR, e.g. open, closed, all | ||
| 
     | 
||
| Returns: | ||
| list: A list of dictionaries, where each dictionary represents a pull request. | ||
| Returns an empty list if no PRs are found or an error occurs. | ||
| """ | ||
| headers = { | ||
| "Authorization": f"token {token}", | ||
| "Accept": "application/vnd.github.v3+json", | ||
| } | ||
| 
     | 
||
| milestone_id = None | ||
| milestone_url = f"https://api.github.com/repos/{owner}/{repo}/milestones" | ||
| params = {"state": "open"} | ||
| 
     | 
||
| try: | ||
| response = requests.get(milestone_url, headers=headers, params=params) | ||
| response.raise_for_status() | ||
| milestones = response.json() | ||
| 
     | 
||
| if len(milestones) > 2: | ||
| print("More than two milestones found, unable to determine the milestone required.") | ||
| exit(1) | ||
| 
     | 
||
| # milestones.pop() | ||
| for ms in milestones: | ||
| if ms["title"] != "Future": | ||
| milestone_id = ms["number"] | ||
| print(f"Gathering PRs with milestone {ms['title']}...") | ||
| break | ||
| 
     | 
||
| if not milestone_id: | ||
| print(f"No suitable milestone found in repository '{owner}/{repo}'.") | ||
| exit(1) | ||
| 
     | 
||
| except requests.exceptions.RequestException as e: | ||
| print(f"Error fetching milestones: {e}") | ||
| exit(1) | ||
| 
     | 
||
| # This endpoint allows filtering by milestone and label. A PR in GH's perspective is a type of issue. | ||
| prs_url = f"https://api.github.com/repos/{owner}/{repo}/issues" | ||
| params = { | ||
| "state": state, | ||
| "milestone": milestone_id, | ||
| "labels": label, | ||
| "per_page": 100, | ||
| } | ||
| 
     | 
||
| all_prs = [] | ||
| page = 1 | ||
| while True: | ||
| try: | ||
| params["page"] = page | ||
| response = requests.get(prs_url, headers=headers, params=params) | ||
| response.raise_for_status() # Raise an exception for HTTP errors | ||
| prs = response.json() | ||
| 
     | 
||
| if not prs: | ||
| break # No more PRs to fetch | ||
| 
     | 
||
| # Check for pr key since we are using issues endpoint instead. | ||
| all_prs.extend([item for item in prs if "pull_request" in item]) | ||
| page += 1 | ||
| 
     | 
||
| except requests.exceptions.RequestException as e: | ||
| print(f"Error fetching pull requests: {e}") | ||
| exit(1) | ||
| 
     | 
||
| return all_prs | ||
| 
     | 
||
| 
     | 
||
| def get_prs(pull_request_items: list[dict], label: str = "", state: str = "all") -> list[dict]: | ||
| """ | ||
| Returns a list of pull requests after applying the label and state filters. | ||
| 
     | 
||
| Args: | ||
| pull_request_items (list[dict]): List of PR items. | ||
| label (str): The label name. | ||
| state (str): State of PR, e.g. open, closed, all | ||
| 
     | 
||
| Returns: | ||
| list: A list of dictionaries, where each dictionary represents a pull request. | ||
| Returns an empty list if no PRs are found. | ||
| """ | ||
| pr_list = [] | ||
| count = 0 | ||
| for pr in pull_request_items: | ||
| if pr["state"] == state and [item for item in pr["labels"] if item["name"] == label]: | ||
| pr_list.append(pr) | ||
| count += 1 | ||
| 
     | 
||
| print(f"Found {count} PRs with {label if label else 'no'} label and state as {state}") | ||
| 
     | 
||
| return pr_list | ||
| 
     | 
||
| 
     | 
||
| def get_pr_descriptions(pull_request_items: list[dict]) -> str: | ||
| """ | ||
| Returns the concatenated string of pr title and number in the format of | ||
| '- PR title 1 #3651 | ||
| - PR title 2 #3652 | ||
| - PR title 3 #3653 | ||
| ' | ||
| 
     | 
||
| Args: | ||
| pull_request_items (list[dict]): List of PR items. | ||
| 
     | 
||
| Returns: | ||
| str: a string of PR titles and numbers | ||
| """ | ||
| description_content = "" | ||
| for pr in pull_request_items: | ||
| description_content += f"- {pr['title']} #{pr['number']}\n" | ||
| 
     | 
||
| return description_content | ||
| 
     | 
||
| 
     | 
||
| def update_pull_request_description(token: str, owner: str, repo: str, pr_number: int, new_description: str) -> None: | ||
| """ | ||
| Updates the description (body) of a GitHub Pull Request. | ||
| 
     | 
||
| Args: | ||
| token (str): Token. | ||
| owner (str): The owner of the repository. | ||
| repo (str): The name of the repository. | ||
| pr_number (int): The number of the pull request to update. | ||
| new_description (str): The new content for the PR's description. | ||
| 
     | 
||
| Returns: | ||
| dict or None: The updated PR object (as a dictionary) if successful, | ||
| None otherwise. | ||
| """ | ||
| headers = { | ||
| "Authorization": f"token {token}", | ||
| "Accept": "application/vnd.github.v3+json", | ||
| "Content-Type": "application/json", | ||
| } | ||
| 
     | 
||
| url = f"https://api.github.com/repos/{owner}/{repo}/pulls/{pr_number}" | ||
| 
     | 
||
| payload = {"body": new_description} | ||
| 
     | 
||
| print(f"Attempting to update PR #{pr_number} in {owner}/{repo}...") | ||
| print(f"URL: {url}") | ||
| 
     | 
||
| try: | ||
| response = None | ||
| response = requests.patch(url, headers=headers, json=payload) | ||
| response.raise_for_status() | ||
| 
     | 
||
| print(f"Successfully updated PR #{pr_number}.") | ||
| 
     | 
||
| except requests.exceptions.RequestException as e: | ||
| print(f"Error updating pull request #{pr_number}: {e}") | ||
| if response is not None: | ||
| print(f"Response status code: {response.status_code}") | ||
| print(f"Response text: {response.text}") | ||
| exit(1) | ||
| 
     | 
||
| 
     | 
||
| if __name__ == "__main__": | ||
| github_token = getenv("GITHUB_TOKEN") | ||
| 
     | 
||
| if not github_token: | ||
| print("Error: GITHUB_TOKEN environment variable not set.") | ||
| exit(1) | ||
| 
     | 
||
| repository_owner = "flow-launcher" | ||
| repository_name = "flow.launcher" | ||
| state = "all" | ||
| 
     | 
||
| print(f"Fetching {state} PRs for {repository_owner}/{repository_name} ...") | ||
| 
     | 
||
| pull_requests = get_github_prs(github_token, repository_owner, repository_name) | ||
| 
     | 
||
| if not pull_requests: | ||
| print("No matching pull requests found") | ||
| exit(1) | ||
| 
     | 
||
| print(f"\nFound total of {len(pull_requests)} pull requests") | ||
| 
     | 
||
| release_pr = get_prs(pull_requests, "release", "open") | ||
| 
     | 
||
| if len(release_pr) != 1: | ||
| print(f"Unable to find the exact release PR. Returned result: {release_pr}") | ||
| exit(1) | ||
| 
     | 
||
| print(f"Found release PR: {release_pr[0]['title']}") | ||
| 
     | 
||
| enhancement_prs = get_prs(pull_requests, "enhancement", "closed") | ||
| bug_fix_prs = get_prs(pull_requests, "bug", "closed") | ||
| 
     | 
||
| description_content = "# Release notes\n" | ||
| description_content += f"## Features\n{get_pr_descriptions(enhancement_prs)}" if enhancement_prs else "" | ||
| description_content += f"## Bug fixes\n{get_pr_descriptions(bug_fix_prs)}" if bug_fix_prs else "" | ||
| 
     | 
||
| update_pull_request_description( | ||
| github_token, repository_owner, repository_name, release_pr[0]["number"], description_content | ||
| ) | ||
| 
     | 
||
| print(f"PR content updated to:\n{description_content}") | ||
  
    
      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,91 @@ | ||
| # This workflow will build a .NET project | ||
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | ||
| 
     | 
||
| name: Build | ||
| 
     | 
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - dev | ||
| - master | ||
| pull_request: | ||
| 
     | 
||
| jobs: | ||
| build: | ||
| 
     | 
||
| runs-on: windows-latest | ||
| env: | ||
| FlowVersion: 1.19.5 | ||
| NUGET_CERT_REVOCATION_MODE: offline | ||
| BUILD_NUMBER: ${{ github.run_number }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set Flow.Launcher.csproj version | ||
| id: update | ||
| uses: vers-one/[email protected] | ||
| with: | ||
| file: | | ||
| "**/SolutionAssemblyInfo.cs" | ||
| version: ${{ env.FlowVersion }}.${{ env.BUILD_NUMBER }} | ||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: 7.0.x | ||
| # cache: true | ||
| # cache-dependency-path: | | ||
| # Flow.Launcher/packages.lock.json | ||
| # Flow.Launcher.Core/packages.lock.json | ||
| # Flow.Launcher.Infrastructure/packages.lock.json | ||
| # Flow.Launcher.Plugin/packages.lock.json | ||
| - name: Install vpk | ||
| run: dotnet tool install -g vpk | ||
| - name: Restore dependencies | ||
| run: nuget restore | ||
| - name: Build | ||
| run: dotnet build --no-restore -c Release | ||
| - name: Initialize Service | ||
| run: | | ||
| sc config WSearch start= auto # Starts Windows Search service- Needed for running ExplorerTest | ||
| net start WSearch | ||
| - name: Test | ||
| run: dotnet test --no-build --verbosity normal -c Release | ||
| - name: Perform post_build tasks | ||
| shell: powershell | ||
| run: .\Scripts\post_build.ps1 | ||
| - name: Upload Plugin Nupkg | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: Plugin nupkg | ||
| path: | | ||
| Output\Release\Flow.Launcher.Plugin.*.nupkg | ||
| compression-level: 0 | ||
| - name: Upload Setup | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: Flow Installer | ||
| path: | | ||
| Output\Packages\Flow-Launcher-*.exe | ||
| compression-level: 0 | ||
| - name: Upload Portable Version | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: Portable Version | ||
| path: | | ||
| Output\Packages\Flow-Launcher-Portable.zip | ||
| compression-level: 0 | ||
| - name: Upload Full Nupkg | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: Full nupkg | ||
| path: | | ||
| Output\Packages\FlowLauncher-*-full.nupkg | ||
| 
     | 
||
| compression-level: 0 | ||
| - name: Upload Release Information | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: RELEASES | ||
| path: | | ||
| Output\Packages\RELEASES | ||
| compression-level: 0 | 
  
    
      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 | 
|---|---|---|
| @@ -1,19 +1,17 @@ | ||
| name: Assign PR to creator | ||
| 
     | 
||
| # Due to GitHub token limitation, only able to assign org members not authors from forks. | ||
| # https://github.com/thomaseizinger/assign-pr-creator-action/issues/3 | ||
| 
     | 
||
| on: | ||
| pull_request: | ||
| pull_request_target: | ||
| types: [opened] | ||
| branches-ignore: | ||
| - l10n_dev | ||
| 
     | 
||
| permissions: | ||
| pull-requests: write | ||
| 
     | 
||
| jobs: | ||
| automation: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Assign PR to creator | ||
| uses: thomaseizinger/[email protected] | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| uses: toshimaru/[email protected] | 
  
    
      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.
        
    
  
      
      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.