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

Use project name for PR title and branch #465

Merged
merged 4 commits into from
Jun 21, 2023

Conversation

emillon
Copy link
Collaborator

@emillon emillon commented Apr 18, 2023

If we're submitting a PR for several packages, this uses "project name (N packages)" as PR title, and the project name is used for the branch.
Previously the branch was taken from the shortest package name.

@emillon
Copy link
Collaborator Author

emillon commented Apr 18, 2023

Ping @Leonidas-from-XIV
In addition, we should use the former strategy when -p is passed. What is the good way to determine that?

@emillon
Copy link
Collaborator Author

emillon commented Apr 18, 2023

NB the description in the PR is still wrong, it says "XDG Base Directory Specification" for dune.

@Leonidas-from-XIV
Copy link
Member

I've added some code to handle -p (it's not very nice but the whole code packaging code is an utter mess).

The issue why it picks the description of XDG is because it uses Pkg.opam_descr is because it uses List.hd pkgs and that is of course utterly random and wrong. I wonder if we should revive #447 to clean up, because attempting to fix this here is just patching leaks.

emillon and others added 2 commits May 3, 2023 14:06
If we're submitting a PR for several packages, this uses "project name
(N packages)" as PR title, and the project name is used for the branch.
Previously the branch was taken from the shortest package name.
@emillon
Copy link
Collaborator Author

emillon commented May 3, 2023

Ah, I didn't see your comment about #447 so I implemented the "find the main package" in a different way. Let me know what you think (I used this for ocaml/opam-repository#23748)

@Leonidas-from-XIV
Copy link
Member

Leonidas-from-XIV commented May 3, 2023

I guess this works as well. It is better than the status quo and if we realize this has some particular issues it can be fixed up later on. It does need a changelog entry though.

Closes #447. (Wonder if this works from a comment?)

@Leonidas-from-XIV Leonidas-from-XIV merged commit b2f0a35 into tarides:main Jun 21, 2023
2 of 3 checks passed
Leonidas-from-XIV added a commit to Leonidas-from-XIV/opam-repository that referenced this pull request Jun 22, 2023
CHANGES:

### Added

- Adopt the OCaml Code of Conduct (tarides/dune-release#473, @rikusilvola)
- Added support for projects that have their OPAM files in the `opam/`
  subdirectory. (tarides/dune-release#466, @Leonidas-from-XIV)

### Changed

- Running `dune-release check` now attempts to discover and parse the change
  log, and a new flag `--skip-change-log` disables this behaviour. (tarides/dune-release#458,
  @gridbugs)
- List the main package and amount of subpackages when creating the PR to avoid
  very long package lists in PRs (tarides/dune-release#465, @emillon)

### Fixed

- Avoid collision between branch and tag name. Tag detection got confused when
  branch was named the same as tag. Now it searches only for tag refs, instead
  of all refs. (tarides/dune-release#452, @3Rafal)
- Fix project name detection from `dune-project`. The parser could get confused
  when opam file generation is used. Now it only considers the first `(name X)`
  in the file. (tarides/dune-release#445, @emillon)

### Removed

- Remove support for delegates.
  Previous users of this feature should now use `dune-release delegate-info`
  and wrap dune-release calls in a script. See tarides/dune-release#188 for details.
  (tarides/dune-release#428, @NathanReb)
- Removed support for the OPAM 1.2.2 client. This means `dune-release` expects
  the `opam` binary to be version 2.0 at least. (tarides/dune-release#406, tarides/dune-release#411,
  @Leonidas-from-XIV)
Leonidas-from-XIV added a commit to Leonidas-from-XIV/opam-repository that referenced this pull request Jun 23, 2023
CHANGES:

### Added

- Adopt the OCaml Code of Conduct (tarides/dune-release#473, @rikusilvola)
- Added support for projects that have their OPAM files in the `opam/`
  subdirectory. (tarides/dune-release#466, @Leonidas-from-XIV)

### Changed

- Running `dune-release check` now attempts to discover and parse the change
  log, and a new flag `--skip-change-log` disables this behaviour. (tarides/dune-release#458,
  @gridbugs)
- List the main package and amount of subpackages when creating the PR to avoid
  very long package lists in PRs (tarides/dune-release#465, @emillon)

### Fixed

- Avoid collision between branch and tag name. Tag detection got confused when
  branch was named the same as tag. Now it searches only for tag refs, instead
  of all refs. (tarides/dune-release#452, @3Rafal)
- Fix project name detection from `dune-project`. The parser could get confused
  when opam file generation is used. Now it only considers the first `(name X)`
  in the file. (tarides/dune-release#445, @emillon)

### Removed

- Remove support for delegates.
  Previous users of this feature should now use `dune-release delegate-info`
  and wrap dune-release calls in a script. See tarides/dune-release#188 for details.
  (tarides/dune-release#428, @NathanReb)
- Removed support for the OPAM 1.2.2 client. This means `dune-release` expects
  the `opam` binary to be version 2.0 at least. (tarides/dune-release#406, tarides/dune-release#411,
  @Leonidas-from-XIV)

### Security
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.

None yet

2 participants