Skip to content

AutoMerge: Manual merge support app - #720

Open
GunnarFarneback wants to merge 5 commits into
masterfrom
manualmerge
Open

GunnarFarneback wants to merge 5 commits into
masterfrom
manualmerge

Conversation

@GunnarFarneback

Copy link
Copy Markdown
Contributor

Another app (cf. #719), this one intended to help General registry maintainers to analyze manual PRs.

Initially this app only knows how to analyze yank and repository move PRs, e.g.

$ manual_merge_analysis 155388
Analyzing PR 155388 by maleadt
Title: GPUCompiler: yank v1.11

Identified as a yank PR for GPUCompiler.

✔ Yank is syntactically correct.
✔ Yank line immediately follows a `git-tree-sha1` line.

Note: This analysis does not consider whether the right version is yanked or if there is a better alternative to yanking.

and

$ manual_merge_analysis 156011
Analyzing PR 156011 by kshyatt
Title: Update url of VectorInterface.jl

Identified as a move repository PR for VectorInterface.

Old URL: https://github.com/Jutho/VectorInterface.jl.git
New URL: https://github.com/QuantumKitHub/VectorInterface.jl.git

✔ Old URL redirects to new URL.
✔ New URL ends with `.git`.
✔ New URL starts with `https://`.
✔ Last URL part is unchanged.
✔ New URL looks normal.
✔ New URL can be git cloned.
✔ Version 0.1.0 tree hash found in cloned repository.
✔ Version 0.2.0 tree hash found in cloned repository.
✔ Version 0.3.0 tree hash found in cloned repository.
✔ Version 0.3.1 tree hash found in cloned repository.
✔ Version 0.4.0 tree hash found in cloned repository.
✔ Version 0.4.1 tree hash found in cloned repository.
✔ Version 0.4.2 tree hash found in cloned repository.
✔ Version 0.4.3 tree hash found in cloned repository.
✔ Version 0.4.4 tree hash found in cloned repository.
✔ Version 0.4.5 tree hash found in cloned repository.
✔ Version 0.4.6 tree hash found in cloned repository.
✔ Version 0.4.7 tree hash found in cloned repository.
✔ Version 0.4.8 tree hash found in cloned repository.
✔ Version 0.4.9 tree hash found in cloned repository.
✔ Version 0.5.0 tree hash found in cloned repository.

You can install the app before merge with

(@v1.12) pkg> app add AutoMerge#manualmerge

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 318 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.34%. Comparing base (52a3337) to head (a9d9389).

Files with missing lines Patch % Lines
AutoMerge/src/manual_merge.jl 0.00% 318 Missing ⚠️

❌ Your project check has failed because the head coverage (40.34%) is below the target coverage (70.00%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (52a3337) and HEAD (a9d9389). Click for more details.

HEAD has 14 uploads less than BASE
Flag BASE (52a3337) HEAD (a9d9389)
24 10
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #720       +/-   ##
===========================================
- Coverage   78.40%   40.34%   -38.06%     
===========================================
  Files          29       29               
  Lines        1945     2238      +293     
===========================================
- Hits         1525      903      -622     
- Misses        420     1335      +915     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GunnarFarneback

Copy link
Copy Markdown
Contributor Author

New feature. Running without arguments gives a list of currently open manual PRs, i.e. PRs not created by JuliaRegistrator or jlbuild. Furthermore the numbers for PRs not created by known bot accounts are highlighted in green.

@GunnarFarneback GunnarFarneback changed the title Draft: AutoMerge: Manual merge support app AutoMerge: Manual merge support app Jun 26, 2026
@GunnarFarneback

Copy link
Copy Markdown
Contributor Author

This can now analyze the following kinds of manual PRs:

  • move repository
  • change subdir
  • move repository and change subdir
  • retroactive compat changes
  • yank

It does not yet support new packages and new versions but those probably require some refactoring of existing AutoMerge code, so I think it would be better to try to get this reviewed and merged in its current shape. The diff is big enough as it is.

length(ARGS) > 1 && return fatal("Usage: manualmerge <PR Number>")

api = GitHub.GitHubWebAPI(URIs.URI("https://api.github.com"))
auth = GitHub.AnonymousAuth()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will we get rate limited? is there a way to pass a token?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those things are outside my knowledge. It's not like this will be doing a significant number of API calls, but I have no clue about rate limitations.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, the rate limit for unauthenticated API calls is super low. It's something like 60 per hour.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this requires two API calls per analyzed PR (one pull_request and one pull_request_files) . The continuation in #725 may need more, at least without tighter integration with the guideline checks.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should at least have a way for users to pass in a token. As far as I can tell, the token would only need read-only access to only public repos, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the typical way to pass in a token? A --token command line argument, an environment variable, something else?

Yes, all that's needed is to read PR information from General.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only tangentially related but i've found the gh cli as an easy way to obtain one, fyi: https://cli.github.com/manual/gh_auth_token

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants