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

[Bug]: mason publish missing link to create a PR #25008

Open
jeremiah-corrado opened this issue May 7, 2024 · 3 comments
Open

[Bug]: mason publish missing link to create a PR #25008

jeremiah-corrado opened this issue May 7, 2024 · 3 comments

Comments

@jeremiah-corrado
Copy link
Contributor

The mason publish command should provide the user with a github URL to create a pull request against the mason package registry. See the "publish steps" section in these docs: https://chapel-lang.org/docs/tools/mason/guide/submitting.html

In testing this, I'm seeing that no URL is provided, and the user gets the following output:

--------------------------------------------------------------------
Go to the above link to open up a Pull Request to the mason-registry

It is still possible to create the pull request manually from the user's fork of the mason registry.

@lucaferranti
Copy link
Contributor

I can confirm this happened to me when doing chapel-lang/mason-registry#74

@lucaferranti
Copy link
Contributor

lucaferranti commented May 10, 2024

Isn't the link always

https://github.com/chapel-lang/mason-registry

?

Looking at the lines in MasonPublish

    if !isLocal {
      gitC(safeDir + "/mason-registry", "git add .");
      commitSubProcess(safeDir + '/mason-registry', command);
      gitC(safeDir + "/mason-registry", 'git push --set-upstream origin ' + name, true);
      rmTree(safeDir + '/');
      writeln('--------------------------------------------------------------------');
      writeln('Go to the above link to open up a Pull Request to the mason-registry');
     }

and thinking about what git steps are called under the hood, I am not sure which one (if any) would print the link to the upstream registry repository. Even if there is one, I would guess also the link to the fork gets printed somewhere and moreover hunting the link from what git prints might be a bit confusing.

All in all, I think the quickiest (and not even dirty) fix would be to replace the second writeln with something like

writeln('Go to https://github.com/chapel-lang/mason-registry  to open up a Pull Request to the mason-registry');

any downside to this?

@jeremiah-corrado
Copy link
Contributor Author

Isn't the link always

I think linking to the registry repo would be a good solution; however it might also be possible to provide a link that takes the user directly to a page where a new pull request is created. With github, this would look like:

https://github.com/jeremiah-corrado/mason-registry/pull/new/<PackageName>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants