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

Better control over which branches are ocaml-ci worthy #805

Open
n-osborne opened this issue Apr 5, 2023 · 1 comment
Open

Better control over which branches are ocaml-ci worthy #805

n-osborne opened this issue Apr 5, 2023 · 1 comment
Labels
type/enhancement New feature or request

Comments

@n-osborne
Copy link

Context

When a repository is registered to ocaml-ci, all the branches are tested.

Expected behaviour

It would be nice if we could have a better control over which branches are ocaml-ci worthy (I would say, a sane default would be the default branch of the repo and the PRs on it). That would allow to avoid testing branches that we know are not working (it doesn't even work at home) or are not ready (experimentation...).

@n-osborne n-osborne added the type/enhancement New feature or request label Apr 5, 2023
@tmcgilchrist
Copy link
Member

Small correctionocaml-ci won't test branches that are over 3 months old but otherwise that is correct.

ocaml-ci/service/conf.ml

Lines 17 to 19 in 3baf50e

(* GitHub defines a stale branch as more than 3 months old.
Don't bother testing these. *)
let max_staleness = Duration.of_day 93

The application doesn't currently persist any per-user or per-repo configuration data. However there are some features that would benefit from having that ability. If such a feature existed how do you think it should work?

Some ideas that I've used elsewhere:

  1. Having a pattern for branch names to ignore eg refs with names of "experiment/*"
  2. Pattern match for branches to build (including the default branch)
  3. Only build PRs and default branch (or a short list of known refs/branches)

To keep with the goals of OCaml-CI it should continue to work by default, building any active branch or PR, with an opam/dune driven no-configuration approach to building OCaml projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants