File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed
Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1212'''
1313
1414def find_table_points (lines ):
15+ """
16+ Find table points within a given list of lines.
17+
18+ The table points are determined by the presence of the markers:
19+ <!-- TABLE BEGINS -->
20+ <!-- TABLE ENDS -->
21+
22+ Args:
23+ lines (list): List of lines to search in.
24+
25+ Returns:
26+ tuple: A tuple of two integers containing the start and end indices of
27+ the table points.
28+
29+ Raises:
30+ SystemExit: If the table markers are not found or if the table end
31+ marker appears before the table start marker.
32+ """
1533
1634 # Setting default return values
1735 table_start = None
@@ -42,6 +60,18 @@ def find_table_points(lines):
4260
4361
4462def main ():
63+ """
64+ Update the index.md file with the latest contributors data.
65+
66+ This function retrieves the REPO_NAME environment variable and the
67+ CONTRIBUTORS_LOG file path. It then reads the log file and extracts the
68+ data from it. The function then reads the index.md file and calculates
69+ the table points. If the table does not exist, it creates the table
70+ header. The function then iterates over the log data and updates the
71+ table with the latest data. Finally, it updates the index.md file with
72+ the updated data and prints a success message.
73+
74+ """
4575
4676 # Retrieving Environmental variables
4777 REPO_NAME = os .environ .get ('REPO_NAME' )
Original file line number Diff line number Diff line change 1212'''
1313
1414def find_table_points (lines ):
15+ """
16+ Find table points within a given list of lines.
17+
18+ The table points are determined by the presence of the markers:
19+ <!-- TABLE BEGINS -->
20+ <!-- TABLE ENDS -->
21+
22+ Args:
23+ lines (list): List of lines to search in.
24+
25+ Returns:
26+ tuple: A tuple of two integers containing the start and end indices of
27+ the table points.
28+
29+ Raises:
30+ SystemExit: If the table markers are not found or if the table end
31+ marker appears before the table start marker.
32+ """
1533
1634 # Setting default return values
1735 table_start = None
@@ -42,6 +60,18 @@ def find_table_points(lines):
4260
4361
4462def main ():
63+ """
64+ Update the index.md file with the latest contributors data.
65+
66+ This function retrieves the REPO_NAME environment variable and the
67+ CONTRIBUTORS_LOG file path. It then reads the log file and extracts the
68+ data from it. The function then reads the index.md file and calculates
69+ the table points. If the table does not exist, it creates the table
70+ header. The function then iterates over the log data and updates the
71+ table with the latest data. Finally, it updates the index.md file with
72+ the updated data and prints a success message.
73+
74+ """
4575
4676 # Retrieving Environmental variables
4777 REPO_NAME = os .environ .get ('REPO_NAME' )
You can’t perform that action at this time.
0 commit comments