Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from udda1996/add-codeowners
Browse files Browse the repository at this point in the history
Add codeowners for sample scripts
  • Loading branch information
praneesha authored Jun 2, 2022
2 parents 12d80e4 + f310668 commit bd518b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.

# See: https://help.github.com/articles/about-codeowners/

# These owners will be the default owners for everything in the repo.
* @sameerajayasoma
10 changes: 5 additions & 5 deletions src/scripts/update_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
from bs4 import BeautifulSoup

ballerina_bot_username = os.environ['BALLERINA_BOT_USERNAME']
ballerina_bot_token = os.environ[]'BALLERINA_BOT_TOKEN']
ballerina_bot_token = os.environ['BALLERINA_BOT_TOKEN']
ballerina_bot_email = os.environ['BALLERINA_BOT_EMAIL']
ballerina_reviewer_bot_token = os.environ['BALLERINA_REVIEWER_BOT_TOKEN']

github = Github(ballerina_bot_token)

def main():
repo = github.get_repo('ballerina-platform/ballerina-dev-website', ref='master')
repo = github.get_repo('ballerina-platform/ballerina-dev-website', 'master')
html_file = repo.get_contents('index.html')
html_file = html_file.decoded_content.decode('utf-8')

Expand All @@ -25,7 +25,7 @@ def main():
html_doc = soup1.read()
soup = BeautifulSoup(html_doc, 'html.parser')

with open('working_with_data.bal', 'r') as action_obj:
with open('src/scripts/working_with_data.bal', 'r') as action_obj:
action_bbe = action_obj.readlines()

old_text = soup.find('div', {'id':'working-with-data'})
Expand Down Expand Up @@ -59,10 +59,10 @@ def main():
print('Error occurred while committing changes to ballerina-dev-website', e)

# commit the changes
def commit_file(file_path, Updated_file_content, commit_branch, commit_message):
def commit_file(file_path, updated_file_content, commit_branch, commit_message):
try:
author = InputGitAuthor(ballerina_bot_username, ballerina_bot_email)
repo = github.get_repo('ballerina-platform/ballerina-dev-website', ref='master')
repo = github.get_repo('ballerina-platform/ballerina-dev-website', 'master')
remote_file = repo.get_contents(file_path)

base = repo.get_branch('master')
Expand Down

0 comments on commit bd518b3

Please sign in to comment.