Explorar o código

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.
Jon Meow %!s(int64=5) %!d(string=hai) anos
pai
achega
e9130a29e9

+ 2 - 2
.pre-commit-config.yaml

@@ -26,7 +26,7 @@ repos:
       - id: markdown-toc
         name: Update table of contents
         description: Runs https://github.com/jonschlinkert/markdown-toc
-        entry: src/scripts/pre-commit-toc.js
+        entry: src/scripts/pre_commit_toc.js
         language: node
         additional_dependencies: [markdown-toc]
         files: .*\.md$
@@ -34,7 +34,7 @@ repos:
       - id: proposal-list
         name: Update list of proposals
         description: Updates the list of proposals in proposals/README.md
-        entry: src/scripts/pre-commit-proposal-list.py
+        entry: src/scripts/update_proposal_list.py
         language: python
         language_version: python3
         files: ^proposals/(README|p.*)\.md$

+ 1 - 1
docs/project/groups.md

@@ -24,7 +24,7 @@ We use a mix of:
 -   [GitHub organization](https://github.com/orgs/carbon-language/people)
     -   [GitHub team: Contributors with label access](https://github.com/orgs/carbon-language/teams/contributors-with-label-access):
         Mirrors the GitHub organization for write access.
-        [Manually updated](/src/scripts/update-label-access.js).
+        [Manually updated](/src/scripts/update_label_access.js).
 -   [Discourse Forums account](https://forums.carbon-lang.dev)
 -   [Discord Chat access](https://discord.com/app)
 -   [Google group](https://groups.google.com/g/carbon-lang-contributors): Grants

+ 5 - 5
proposals/README.md

@@ -21,16 +21,16 @@ request:
 ## Proposal list
 
 <!-- proposals -->
-<!-- This list is updated by src/scripts/pre-commit-proposal-list.py. -->
+<!-- This list is updated by src/scripts/update_proposal_list.py. -->
 
 -   [0029 - Linear, rebase, and pull-request GitHub workflow](p0029.md)
-    -   [Decision](p0029-decision.md)
+    -   [Decision](p0029_decision.md)
 -   [0044 - Proposal tracking](p0044.md)
-    -   [Decision](p0044-decision.md)
+    -   [Decision](p0044_decision.md)
 -   [0051 - Goals](p0051.md)
-    -   [Decision](p0051-decision.md)
+    -   [Decision](p0051_decision.md)
 -   [0074 - Change comment/decision timelines in proposal process](p0074.md)
-    -   [Decision](p0074-decision.md)
+    -   [Decision](p0074_decision.md)
 -   [0083 - In-progress design overview](p0083.md)
 
 <!-- endproposals -->

+ 0 - 0
proposals/p0029-decision.md → proposals/p0029_decision.md


+ 0 - 0
proposals/p0044-decision.md → proposals/p0044_decision.md


+ 0 - 0
proposals/p0051-decision.md → proposals/p0051_decision.md


+ 0 - 0
proposals/p0074-decision.md → proposals/p0074_decision.md


+ 1 - 1
proposals/template.md

@@ -23,7 +23,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
 ## TODO: Initial proposal setup
 
-> TIP: Run `../src/scripts/new-proposal.py "TITLE"` to do new proposal setup.
+> TIP: Run `../src/scripts/new_proposal.py "TITLE"` to do new proposal setup.
 
 1. Copy this template to `new.md`, and create a commit.
 2. Create a GitHub pull request, to get a pull request number.

+ 0 - 0
proposals/template-decision.md → proposals/template_decision.md


+ 0 - 0
src/scripts/new-proposal.py → src/scripts/new_proposal.py


+ 0 - 0
src/scripts/pre-commit-toc.js → src/scripts/pre_commit_toc.js


+ 0 - 0
src/scripts/update-label-access.js → src/scripts/update_label_access.js


+ 2 - 2
src/scripts/pre-commit-proposal-list.py → src/scripts/update_proposal_list.py

@@ -21,7 +21,7 @@ if __name__ == "__main__":
 
     # Identify proposal titles in the file list.
     proposals = [
-        "<!-- This list is updated by src/scripts/pre-commit-proposal-list.py. "
+        "<!-- This list is updated by src/scripts/update_proposal_list.py. "
         "-->",
         "",
     ]
@@ -40,7 +40,7 @@ if __name__ == "__main__":
         proposals.append(
             "-   [%s - %s](%s)" % (file_match[1], title_match[1], file)
         )
-        decision_file = "p%s-decision.md" % file_match[1]
+        decision_file = "p%s_decision.md" % file_match[1]
         if os.path.exists(os.path.join(proposal_dir, decision_file)):
             proposals.append("    -   [Decision](%s)" % decision_file)
     # We print batched errors for usability, but still need to exit with