Commit Graph
19 Commits
Author SHA1 Message Date
Jon Meow 98ebae62a6 Update pre-commit versions and fix black break (#160)
Caught by black stable change, done by `pre-commit autoupdate`

`pre-commit autoupdate` also wanted to update pre-commit-hooks, but that gave me some pyenv errors so I'm leaving it alone for now.
2020-09-15 09:00:24 -07:00
Jon Meow ef1e9ea40c Update the new proposal script with some tests and changes from #96 (#156)
- Tests
- Fix Python style
- Use argparse for arguments
- Switch to git commit --amend
2020-09-09 09:48:00 -07:00
Jon Meow 946e4fedbc Remove unused args (#153) 2020-09-08 08:41:33 -07:00
Jon Meow 37c1e42b98 Migrate update_label_access to Python, and start consolidating GraphQL logic. (#147)
Main reasons for doing this were:

- Add tests for update_label_access
- Reduce js reliance
- Unify handling of access tokens
- Migrate more to GH's graphql (unfortunately not everything, pygithub is rest-based)
- With pytest, reduce the number of executable scripts
2020-09-03 10:20:54 -07:00
Jon Meow 23d9ae050d Add copyrights to pr_comments (#146) 2020-08-20 09:26:40 -07:00
Jon Meow e9130a29e9 Use _ consistently in filenames (#135)
This had been causing me issues when writing a test for pr-comments.py, which I then renamed so that I could import. It's had me mulling that I should really write tests for other scripts, but the name gets in the way.

The decision files are just an exception, so trying to reach consistency.
2020-08-18 08:32:23 -07:00
Jon Meow 63d0b84303 Handle PR reviews. (#134)
The main comment on a review wasn't being handled, and this change interleaves it with the PR comments. GitHub treats these as different entities.

I'm hiding reviews with no top-level comment; these didn't seem worth including empty comments.

Links are being added to PR comments to make them easier to find. This means indenting the content, so now all comments (PR or review thread) are consistently indented, removing a parameter. Also, I'm adjusting the formatting of review threads to match.

snippets for comparison:
```
https://github.com/carbon-language/carbon-lang/pull/83#issuecomment-645573273
  googlebot: All (the pull request submitter and all commit authors) CLAs are...

https://github.com/carbon-language/carbon-lang/pull/83#pullrequestreview-434377138
  chandlerc: Overall, I think this is a pretty significant improved direction...
```

and from a review thread:
```
https://github.com/carbon-language/carbon-lang/pull/83/files/9863da8#diff-8f28081abb21e65fba5a0b0b29404c78R16
  - line 16; unresolved
  - diff: https://github.com/carbon-language/carbon-lang/pull/83/files/9863da8..HEAD#diff-8f28081abb21e65fba5a0b0b29404c78L16
  josh11b: ```suggestion¶ - Block comments begin with a line starting with `/...
  jonmeow: "begin with a line starting with" phrasing is a little confusing t...
  josh11b: As I understand @zygoloid 's lexing proposal, there may be additio...
  jonmeow: Rewritten with example
```
2020-07-31 13:16:15 -07:00
Jon Meow 598283cd5c Link to comments as they are in files. (#133) 2020-07-31 08:24:47 -07:00
Jon Meow 3706d4350d Polish script, address TODOs (#131) 2020-07-30 11:00:08 -07:00
Jon Meow 70ee36e8bb Support pagination and improve location info for comments. (#129) 2020-07-28 17:27:50 -07:00
Jon Meow fd4bf92717 Script to list PR comments (#128) 2020-07-28 15:53:09 -07:00
Jon Meow be116a46c9 Adjust md tab width to work better cross-markdown-parser (#124)
We're running into issues with md handlers that expect this kind of 4-space indent. It should be cross-compatible with GH, so switch, even though it feels a little churny.

Manual edits are to:

- .prettierrc.yaml:
    - rename from .prettierrc
    - add tabWidth (primary change)
    - add trailingComma (fix vimPrettier skew)
- contribution_tools.md: Fix remarks about .prettierrc.yaml
- pre-commit-toc.js: indent, bullets
- pre-commit-proposal-list.py: indent of output

The rest is the result of `pre-commit run --all-files`

Unfortunately this'll probably depend on the change being propagated into PR branches, so I wouldn't be surprised if we see regressions for a bit. We'll also need to nudge people to update .vimrc's. Hopefully the pre-commit GH action helps catch issues.
2020-07-27 10:47:38 -07:00
Jon MeowandRichard Smith af67e7452f Creates a convenience script for making new proposals. (#96)
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
2020-07-10 13:37:46 -07:00
Jon Meow f12e86c23c Script a list of proposals in proposals/README.md (#92)
Per request from chandlerc, to make it easier to skim proposal titles outside the website.

Also fix the title of markdown-toc.
2020-06-29 15:42:26 -07:00
Jon Meow 55c8d898e1 Enable pagination in octokit calls. (#91)
Especially relevant now that we're over 30 people.

The console logs are just helpful flags for possible bugs.
2020-06-25 08:38:43 -07:00
Jon Meow c0b63c5361 Help with proper toc labeling (#86)
Particularly to fix casing if somebody does "Table of Contents"
2020-06-22 11:36:16 -07:00
Chandler Carruth a08a9afbf0 Make the TOC pre-commit script more flexible in finding node. (#82) 2020-06-17 20:22:46 -07:00
Jon MeowandChandler Carruth f1e4323fda Set up pre-commit (#73)
Added here:

- .pre-commit-config.yaml
- docs/project/contribution_tools.md
- src/scripts/pre-commit-toc.js
- CONTRIBUTING.md
- proposals/* (just to switch TOC formats)

The rest consists of auto-generated fixes.

The switch from doctoc to markdown-toc is because doctoc wants to put a TOC in every file, whereas markdown-toc only does it if you have an insertion point.

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
2020-06-16 09:09:10 -07:00
Jon Meow 411c171b95 Add a script for updating the triage group (#64)
We're using labels for proposals... https://github.com/carbon-language/carbon-lang/settings/access allows granting triage access for specific teams. https://github.com/organizations/carbon-language/settings/member_privileges doesn't appear to allow doing the same at the org-level. So I've decided to create a team that mirrors the org, and grants triage access. `¯\_(ツ)_/¯`

I don't know that this is the right solution long-term, but for now I think it's right.

Manually updating this group is slow and error-prone, so the script automates it.
2020-06-11 21:19:59 -07:00