doc: Add CODEOWNERS file to automatically nominate PR reviewers #18949

pull adamjonas wants to merge 2 commits into bitcoin:master from adamjonas:2020-5-add-codeowners changing 1 files +136 −0
  1. adamjonas commented at 3:41 PM on May 11, 2020: member

    This PR brings back and builds on #17094. GitHub uses a CODEOWNERS magic file to automatically add tagged contributors to the "Reviewers" list for a PR.

    The goal of this is to make use of GitHub's suggested reviewers feature and not to confer ownership or give veto power to specific people. It would be better if this file could be named CODEREVIEWERS, but alas, that wouldn't work. The idea of a NAGFILE was proposed in Bitcoin Core Dev meeting in 2018. While this GitHub implementation has some complications, it's a step towards realizing the promise of automating "reviewing begging" and (hopefully) positively impacting the review process as a whole.

    Of secondary value, this file can serve as documentation for who the maintainers are and who it might be smart to check with for certain areas of code/features (i.e., fuzzing, PSBT, and Bech32) -- this is helpful information for new contributors.

    • The first commit is taken from #17094
    • The second commit adds comments and expands the list of reviewers based on the suggestions and comments from that PR
    • ~The third WIP commit~ This commit also uses the doc dir as an example of granular assignments based on lines of codes ~contributed~ written and/or general engagement with the project. (If interested, here is a report for most lines of code per author for each file). The pro of this level of detail is that the best reviewer is more likely to be nominated. The con is that it will create churn as files are renamed, new files are added, or reviewers want to be added or removed.

    Some open questions:

    • How often should this file be changed?
    • What level of history does one need have on the project before being added to this file? When does it make sense to remove a reviewer?
    • These review notifications can cause a lot of noise and automatically subscribes the requested reviewer to the thread. A GitHub Team based approach would allow for adding or removing reviewers without modifying this file; however, this comes along with its own set of problems, including granting write access. Other projects have used bots to sidestep this.
  2. adamjonas force-pushed on May 11, 2020
  3. elichai commented at 4:05 PM on May 11, 2020: contributor

    I think what @MarcoFalke suggested here: #17094 (comment) is a good idea, this can be a way also for contributors to subscribe to PRs touching specific parts of the code, that way they can know if something might conflict with their PRs or they can know when there's something they feel comfortable reviewing.

    I do wonder though how it will look like when each folder might have a long list of people, Although if it's a problem we maybe could use githubs teams feature, and create teams like validation, crypto, p2p, wallet etc. and subscribe those teams and then add people to the teams accordingly, but maybe that's an overkill.

  4. DrahtBot added the label Docs on May 11, 2020
  5. in CODEOWNERS:97 in cfd2792a37 outdated
      92 | +/doc/dependencies.md                 @fanquake
      93 | +/doc/developer-notes.md              @laanwj
      94 | +/doc/files.md                        @hebasto
      95 | +/doc/gitian-building.md              @laanwj
      96 | +/doc/productivity.md                 @dongcarl
      97 | +/doc/rapidcheck.md                   @jonatack
    


    jonatack commented at 6:41 PM on May 11, 2020:

    The rapidcheck documentation was recently removed along with rapidcheck itself.


    adamjonas commented at 6:56 PM on May 11, 2020:

    Ah, thanks. This section currently serves as an example of what is possible, but your comment also illustrates the point in the PR description that the downside of a detailed CODEOWNERS file is that it will require more attention and updates.


    jonatack commented at 7:15 PM on May 11, 2020:

    your comment also illustrates the point in the PR description that the downside of a detailed CODEOWNERS file is that it will require more attention and updates.

    Agreed. It may be good for someone to be nominated/dedicated to this.

  6. jonatack commented at 7:12 PM on May 11, 2020: member

    Could be worth trying but I'll defer to the maintainers. IIUC this would be a guideline/suggestion and not a limiter, but I'm not sure LOC "contributed" is a great metric. Review time spent on the codebase and willingness to invest time reviewing a particular PR may both be factors as well, but which would not be accounted for. Also, PRs can be improved by repeated rounds of reviewing but in the end only the PR author is taken into account in the LOC stats. It may be good for these factors to be stated if this file is intended to be a reference for new contributors. A final question is if the updating and maintainance effort would be worth the value added.

  7. jonatack commented at 7:17 PM on May 11, 2020: member

    ("contributed" in quotes also because sometimes a refactoring or code move changes the git history to look like the latest committer wrote the code, but I digress... this all just means that active updating and judgement might be important)

  8. ryanofsky approved
  9. ryanofsky commented at 7:56 PM on May 11, 2020: member

    Code review ACK cfd2792a375025b05508fe954e5c0cdfcf41a666. This looks great, and very thoughtfully implemented. I'd like to be added (in this PR or after) as a reviewer for src/interfaces/, and probably a few other places too like src/util/settings/.

    On the concept, I think it's a potentially promising experiment. We'll have to see how it works and how people change the file and use the feature to match their preferences. Maybe it will even encourage less monolithic code organization and breaking up giant files like wallet.cpp into modules that people want to receive review requests for. In past projects, I've found systems for tracking review requests very useful, not just as a guide for what to review next, but also for requesting reviewers I might not have thought of, and for steering new requests away from people who are already overloaded with too many existing ones

  10. in CODEOWNERS:13 in cfd2792a37 outdated
       8 | +# Order is important; the last matching pattern takes the most precedence.
       9 | +# More info on how this file works can be found at:
      10 | +# https://help.github.com/articles/about-codeowners/
      11 | +
      12 | +# This file is called CODEOWNERS because it is a magic file for GitHub to
      13 | +# automatically suggest reviewers. In this project's case, the names below
    


    ariard commented at 12:57 AM on May 12, 2020:

    I would underscore this point even further, like "Not being among the list of potential reviewers shouldn't be as a discouragement for not reviewing. A wide range of careful reviews by contributors from different levels of experience is likely to make the PR more robust as people look at a more diverse aspects of code change".


    adamjonas commented at 5:49 PM on May 13, 2020:

    I like the spirit of this but updated with my own wording.

  11. ariard commented at 1:00 AM on May 12, 2020: member

    Concept ACK, I think that's nice for newcomers, specially with regards to less visible part of the project like build or doc. Though I do think that name CODEOWNERS is pretty deceiving.

    I do like Elichai idea of notifications list to subscribe by labels.

  12. in CODEOWNERS:80 in cfd2792a37 outdated
      75 | +/src/consensus/                     @sipa
      76 | +/src/consensus/tx_verify.*          @jtimon
      77 | +/src/consensus/validation.h         @TheBlueMatt
      78 | +/src/consensus/tx_check.*           @jnewbery
      79 | +
      80 | +# Docs
    


    fjahr commented at 12:16 PM on May 12, 2020:

    I think this section should be in the front. If a PR touches code and one of these files I think the code reviewers should be the ones getting tagged. Meaning I think most of the time that is the better fit rather than the other way around.


    adamjonas commented at 5:50 PM on May 13, 2020:

    Makes sense. Moved.

  13. fjahr commented at 12:19 PM on May 12, 2020: member

    Concept ACK

    We can't be sure how this will work out long term but I think this is worth a try. My biggest concern with this would be that a reviewer that is added to a PR might be a bottleneck. There just needs to be clarity that maintainers don't need to wait for their reviews when something is RFM and if the automatically added reviewers don't have the time or feel they are not the right person they remove themselves. So good job on clarifying what this is and what it isn't!

  14. laanwj commented at 5:09 PM on May 13, 2020: member

    Concept ACK

  15. in CODEOWNERS:91 in cfd2792a37 outdated
      86 | +/doc/build-freebsd.md                @fanquake
      87 | +/doc/build-netbsd.md                 @fanquake
      88 | +/doc/build-openbsd.md                @laanwj
      89 | +/doc/build-osx.md                    @fanquake
      90 | +/doc/build-unix.md                   @laanwj
      91 | +/doc/build-windows.md                @laanwj
    


    laanwj commented at 5:10 PM on May 13, 2020:

    I'm not sure assigning me for the windows build doc is a good idea :smile: (I know I did a bit of this in the past but do consider me windows maintainer of last resort)


    adamjonas commented at 5:52 PM on May 13, 2020:

    Substituted sipsorcery instead.

  16. adamjonas force-pushed on May 13, 2020
  17. MarcoFalke commented at 6:42 PM on May 13, 2020: member

    Concept ACK, I think there is nothing to lose trying this out for a few weeks or months and keeping it if it works.

    Slightly stronger Concept ACK, if my name was removed from the list, since I will get notifications either way.

  18. adamjonas force-pushed on May 13, 2020
  19. adamjonas commented at 7:07 PM on May 13, 2020: member

    Thank you for the review and your suggestions. I've made most of the corrections from the comments. @jonatack

    I'm not sure LOC "contributed" is a great metric

    I've substituted "written" for "contributed" in the commit message and PR description. The purpose of this proposal is to encourage peer review, so it's an error on my part if my wording misses the mark. I agree LOC may not be a great metric and will lead to some poor initial tagging, but it's an easy way to get up and running. Open to other metrics or suggestions as well. @ryanofsky I've added you to the file for the requested files/dirs (and thanks for the encouragement). @ariard I'm missing where the suggestion is made to subscribe by labels. I don't think that's possible without a bot, but GitHub teams come native to the feature. @MarcoFalke Happy to remove anyone that requests it. The unit and functional test suites will probably have to be broken down into more granular assignments for others to pick it up since you were assigned the whole framework.

  20. ryanofsky approved
  21. ryanofsky commented at 9:57 PM on May 14, 2020: member

    Code review ACK cfd604a1a263e80f88596c043c41dc6b15dd4c9a. Changes since previous review: names, dates, places, things. So much

  22. fanquake commented at 12:45 PM on May 19, 2020: member

    Slightly stronger Concept ACK, if my name was removed from the list, since I will get notifications either way.

    Same. I already get emails for everything that happens on this repo. So can probably skip this if it's going to add duplicates.

  23. ryanofsky commented at 8:46 PM on May 19, 2020: member

    Slightly stronger Concept ACK, if my name was removed from the list, since I will get notifications either way.

    Same. I already get emails for everything that happens on this repo. So can probably skip this if it's going to add duplicates.

    I'd be really surprised if github started sending duplicate notifications. I think listing names here could not just be useful for automated emails, but also for project documentation, to give people an idea of who they could ping if they need help with an issue or pull request. Of course if you don't want to be contacted or receive notifications your name shouldn't be here, but it sounds like that's a different issue?

  24. fanquake commented at 2:02 AM on May 20, 2020: member

    I'd be really surprised if github started sending duplicate notifications

    I thought this was the case last time I received a review request, but the behaviour may have changed. I've created a repo here if someone wants to open a PR and test the behaviour.

    but also for project documentation, to give people an idea of who they could ping if they need help with an issue or pull request.

    In that case also put me down for symbol/security-check scripts/tests and glibc compat.

  25. fanquake commented at 7:22 AM on May 20, 2020: member

    I thought this was the case last time I received a review request, but the behaviour may have changed.

    Looks like this is still the case; you'll get an email for the PR, and then a followup with the review request (thanks @elichai):

    <img width="716" alt="emails" src="https://user-images.githubusercontent.com/863730/82414598-df9d4d00-9aa9-11ea-84f5-4d26ba54390d.png">

    However I think I care about this less now. Feel free to add me for the files I mentioned above.

  26. adamjonas force-pushed on May 20, 2020
  27. MarcoFalke commented at 3:49 PM on May 20, 2020: member

    ACK 375dcd15566213c4d58e05a9738c8b5b1360a0d1

  28. adamjonas commented at 3:50 PM on May 20, 2020: member

    @MarcoFalke removed from test framework in 8666f65 @fanquake additions in 375dcd1

  29. ryanofsky commented at 5:36 PM on May 22, 2020: member

    Code review ACK 375dcd15566213c4d58e05a9738c8b5b1360a0d1. Various tweaks since last

  30. MarcoFalke commented at 5:53 PM on May 22, 2020: member

    I am thinking about merging this next week, but I am wondering if there are any outstanding questions or problems that need to be solved first?

  31. in CODEOWNERS:15 in 375dcd1556 outdated
      10 | +# https://help.github.com/articles/about-codeowners/
      11 | +
      12 | +# This file is called CODEOWNERS because it is a magic file for GitHub to
      13 | +# automatically suggest reviewers. In this project's case, the names below
      14 | +# should be thought of as code reviewers rather than owners. Regular
      15 | +# contributors are free to add their names to specific directories or files
    


    jonatack commented at 6:19 PM on May 22, 2020:

    Should reviewers who wish to be added/removed make a PR for this? Should the process be described?


    jonatack commented at 6:29 PM on May 22, 2020:

    Perhaps a gist or devwiki could be used to request being added/removed, and after a regular time period the changes to this file can be batched (rather than people opening PRs to be added/removed).


    MarcoFalke commented at 7:17 PM on May 22, 2020:

    I think anyone who has reviewed more than 5 pull requests AND has been active reviewing for more than 14 days should be allowed to add themselves in a pull request. Such a pull request doesn't need review and can be merged right away when the conditions have been fulfilled. (Exact conditions are up for debate)

  32. jonatack commented at 6:27 PM on May 22, 2020: member

    Concept ACK. Worth trying to see what the real effects will be. If it goes well, I could see more files or parts of the codebase added to the list.

    Potential positives

    • may stimulate review or accelerate it
    • may provide info for newer people on who they can ask for help

    Potential negatives

    • may concentrate requests on fewer people
    • the info for newer people will be incomplete if some don't wish to be on the list
    • adds process (PRs to add/remove people?)
  33. adamjonas force-pushed on May 23, 2020
  34. adamjonas commented at 1:03 AM on May 23, 2020: member

    Since tagged reviewers included in this file will receive notifications, I'd feel more comfortable if everyone listed opted-in before merging so that there aren't any surprises. Namely @sipsorcery, @practicalswift, @meshcollider, @achow101, and @sipa should have a chance to say no.

    Reflected in 92f83731d76c0adc78f815aecac52eb0a7fcde91, I reached out to some folks out-of-band and made their requested adjustments. I also squashed the last commit since the concept has, for the most part, been ACKed.

  35. hebasto approved
  36. hebasto commented at 3:26 AM on May 23, 2020: member

    ACK 92f83731d76c0adc78f815aecac52eb0a7fcde91

  37. practicalswift commented at 5:43 AM on May 23, 2020: contributor

    ACK 92f83731d76c0adc78f815aecac52eb0a7fcde91 :)

  38. sipsorcery commented at 8:01 AM on May 23, 2020: member

    ACK 92f83731d76c0adc78f815aecac52eb0a7fcde91.

  39. MarcoFalke commented at 11:21 AM on May 23, 2020: member

    ACK 92f83731d76c0adc78f815aecac52eb0a7fcde91

  40. jonatack commented at 11:59 AM on May 23, 2020: member

    ACK 92f83731d76c0adc78f815aecac52eb0a7fcde91

  41. MarcoFalke commented at 12:01 PM on May 29, 2020: member

    @achow101 @meshcollider @sipa Progress here is currently blocked unless you select one of the following options:

    • Remove your name for now
    • Keep your name in for now
  42. jonatack commented at 12:38 PM on May 29, 2020: member

    @adamjonas If you have to retouch, feel free to add me to these files (if not too granular and at your discretion):

    LOC touched:

    • src/bitcoin-cli.cpp
    • test/functional/feature_asmap.py
    • test/functional/interface_bitcoin_cli.py
    • test/functional/tool_wallet.py

    (I was tempted to propose these also, as I would not mind being notified, but would prefer to wait until others are added to them first. Posting this as a memo:

    • src/net.h/cpp
    • src/net_processing.h/cpp
    • src/protocol.h/cpp
    • src/txmempool.h/cpp
    • src/validation.h/cpp
    • src/validationinterface.h/cpp)
  43. luke-jr commented at 6:50 PM on June 2, 2020: member

    How does GitHub behave without this file? Does adding it lose some kind of automated suggestion of reviewers?

  44. adamjonas commented at 7:05 PM on June 2, 2020: member

    @luke-jr This file adds automated reviewer suggestions. Without this file, the status quo remains the same.

  45. adamjonas force-pushed on Jun 8, 2020
  46. adamjonas commented at 7:31 PM on June 8, 2020: member

    Touched-up with additional files for @jonatack and adding @achow101 to the wallet as discussed over IRC.

    Still looking for the OK from @jonasschnelli, @sipa, and @meshcollider.

  47. fjahr commented at 12:36 PM on June 12, 2020: member

    If you have to retouch I would be interested in adding these:

    # Coinstats
    /src/node/coinstats.* [@fjahr](/bitcoin-bitcoin/contributor/fjahr/)
    
    # Index
    /src/index/ [@fjahr](/bitcoin-bitcoin/contributor/fjahr/)
    
  48. meshcollider commented at 9:13 AM on June 21, 2020: contributor

    Hi sorry I missed the pings, I think this will make a lot of noise but I would be happy to give it a trial run at least, and remove it later if it is overwhelming. So concept ACK from me.

  49. adamjonas force-pushed on Jun 21, 2020
  50. adamjonas commented at 6:52 PM on June 21, 2020: member

    @meshcollider if it's all the same, I'd rather remove you if you think it could lead to problems. I'm sure this file will require tweaks but the hope is that it adds more signal than noise. I've done the same for @jonasschnelli.

    Other changes in 79042955f59bf56bc93aa93b6b69d3979a89b174 are adding @fjahr to the files he requested and @harding to the docs folder (excluding release notes).

  51. harding commented at 2:34 PM on June 24, 2020: contributor

    ACK (tested the pattern notifying me using git ls-files)

  52. in CODEOWNERS:46 in 79042955f5 outdated
      41 | +/doc/build-openbsd.md                       @laanwj
      42 | +/doc/build-osx.md                           @fanquake
      43 | +/doc/build-unix.md                          @laanwj
      44 | +/doc/build-windows.md                       @sipsorcery
      45 | +/doc/dependencies.md                        @fanquake
      46 | +/doc/developer-notes.md                     @laanwj
    


    sipa commented at 1:19 AM on August 3, 2020:

    Add me for /doc/descriptors.md ?


    adamjonas commented at 7:53 PM on August 3, 2020:

    I believe this should be covered by the descriptors catch-all.

  53. in CODEOWNERS:121 in 79042955f5 outdated
     113 | +/ci/lint/                                   @practicalswift
     114 | +
     115 | +# Bech32
     116 | +/src/bech32.*                               @sipa
     117 | +/src/bench/bech32.*                         @sipa
     118 | +
    


    sipa commented at 1:21 AM on August 3, 2020:

    Section for P2P handling? /src/net_processing.* and /src/protocol.*. Feel free to add me.

  54. in CODEOWNERS:136 in 79042955f5 outdated
     120 | +/src/psbt*                                  @achow101
     121 | +/src/node/psbt*                             @achow101
     122 | +/doc/psbt.md                                @achow101
     123 | +
     124 | +# Consensus
     125 | +/src/consensus/                             @sipa
    


    sipa commented at 1:22 AM on August 3, 2020:

    Other files: /src/validation.* /src/{script,interpreter}.* /src/coins.*.


    adamjonas commented at 8:37 PM on August 3, 2020:

    /src/{script,interpreter}.*

    I had some trouble matching this regex so I used /src/script/interpreter.* -- let me know if I got that wrong.


    sipa commented at 8:50 PM on August 3, 2020:

    I meant: group all of src/coins.* src/script/script.* src/script/interpreter.* src/validation.* and src/consensus/* under "consensus" - despite being spread out those are the most relevant files for defining the consensus implementation.


    adamjonas commented at 3:26 PM on September 1, 2020:

    Sorry for the slow response. I somehow missed this message. I've made the requested changes in the latest push.

  55. adamjonas force-pushed on Aug 3, 2020
  56. doc: Add CODEOWNERS file
    Describes maintainers.
    
    See https://help.github.com/en/articles/about-code-owners for syntax.
    
    Ref #17094.
    e02da22906
  57. jamesob commented at 8:48 PM on August 3, 2020: member

    Any chance I can jump on coins.*, txdb.*, and dbwrapper.* (unless it'll invalidate too many ACKs)?

  58. adamjonas force-pushed on Aug 3, 2020
  59. adamjonas force-pushed on Aug 3, 2020
  60. jamesob commented at 9:04 PM on August 3, 2020: member
  61. adamjonas commented at 9:06 PM on August 3, 2020: member

    Rebased, added sipa/ jameob, and removed redundant practicalswift line in the latest set of touch-ups.

  62. MarcoFalke commented at 5:30 AM on August 4, 2020: member

    re-crACK 2e2cf25ce98c4e1bca4647a2ab54cf5f38167703

  63. doc: Add comments and additional reviewers to CODEOWNERS file a06eb03ded
  64. adamjonas force-pushed on Sep 1, 2020
  65. adamjonas commented at 3:29 PM on September 1, 2020: member

    https://github.com/bitcoin/bitcoin/compare/2e2cf25..a06eb03 adds src/script/script.* and groups the consensus files as requested by @sipa.

  66. MarcoFalke commented at 12:44 PM on September 19, 2020: member

    I think this is ready to go in now. Should be trivial to edit/revert if it turns out to be not useful.

  67. adamjonas commented at 1:14 AM on September 20, 2020: member

    @MarcoFalke, do you think it makes sense to add a reference to this in CONTRIBUTING.md? I could also include the rules for inclusion that you proposed.

  68. MarcoFalke commented at 6:28 AM on September 20, 2020: member

    Before baking this into other documentation, let's try it out first and see whether it causes any issues.

  69. MarcoFalke merged this on Sep 20, 2020
  70. MarcoFalke closed this on Sep 20, 2020

  71. sidhujag referenced this in commit ec9131488c on Sep 21, 2020
  72. adamjonas referenced this in commit cfa08ffb06 on Oct 22, 2020
  73. adamjonas referenced this in commit 6b2bfb5803 on Nov 30, 2020
  74. adamjonas referenced this in commit 86e6add5ca on Nov 30, 2020
  75. laanwj referenced this in commit ca759bc743 on Dec 4, 2020
  76. sidhujag referenced this in commit 9a14b02330 on Dec 4, 2020
  77. PastaPastaPasta referenced this in commit f9ada04431 on Jun 27, 2021
  78. PastaPastaPasta referenced this in commit 05341c8ca2 on Jun 27, 2021
  79. PastaPastaPasta referenced this in commit 6ca1b49ca6 on Jun 28, 2021
  80. PastaPastaPasta referenced this in commit a9840c1343 on Jun 28, 2021
  81. PastaPastaPasta referenced this in commit d45b627d0b on Jun 29, 2021
  82. PastaPastaPasta referenced this in commit 771514fc49 on Jun 29, 2021
  83. PastaPastaPasta referenced this in commit e679898e5a on Jul 1, 2021
  84. PastaPastaPasta referenced this in commit c81497ab2d on Jul 1, 2021
  85. PastaPastaPasta referenced this in commit ab8be307c6 on Jul 1, 2021
  86. PastaPastaPasta referenced this in commit 8656b10b23 on Jul 1, 2021
  87. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me