diff --git a/.github/workflows/build_debug_apk.yml b/.github/workflows/build_debug_apk.yml index b974706a00..4c59f71d3f 100644 --- a/.github/workflows/build_debug_apk.yml +++ b/.github/workflows/build_debug_apk.yml @@ -85,8 +85,6 @@ jobs: run: python send_changelog.py env: GITHUB_EVENT_BEFORE: ${{ github.event.before }} - GITHUB_SHA: ${{ github.sha }} - GITHUB_REPO: ${{ github.repository }} TELEGRAM_CI_BOT_TOKEN: ${{ secrets.TELEGRAM_CI_BOT_TOKEN }} TELEGRAM_CI_CHANNEL_ID: ${{ secrets.TELEGRAM_CI_CHANNEL_ID }} BRANCH: 11-dev diff --git a/.github/workflows/build_release_apk.yml b/.github/workflows/build_release_apk.yml index 563f64d7d0..987c4dad5b 100644 --- a/.github/workflows/build_release_apk.yml +++ b/.github/workflows/build_release_apk.yml @@ -85,8 +85,6 @@ jobs: run: python send_changelog.py env: GITHUB_EVENT_BEFORE: ${{ github.event.before }} - GITHUB_SHA: ${{ github.sha }} - GITHUB_REPO: ${{ github.repository }} TELEGRAM_CI_BOT_TOKEN: ${{ secrets.TELEGRAM_CI_BOT_TOKEN }} TELEGRAM_CI_CHANNEL_ID: ${{ secrets.TELEGRAM_CI_CHANNEL_ID }} BRANCH: 11-alpha diff --git a/.github/workflows/notify_push.yml b/.github/workflows/notify_push.yml index db606bd34a..0b62f90783 100644 --- a/.github/workflows/notify_push.yml +++ b/.github/workflows/notify_push.yml @@ -32,8 +32,6 @@ jobs: run: python send_changelog.py env: GITHUB_EVENT_BEFORE: ${{ github.event.before }} - GITHUB_SHA: ${{ github.sha }} - GITHUB_REPO: ${{ github.repository }} TELEGRAM_CI_BOT_TOKEN: ${{ secrets.NOTIFY_BOT_TOKEN }} TELEGRAM_CI_CHANNEL_ID: ${{ secrets.NOTIFY_CHANNEL_ID }} BRANCH: ${{ github.ref }} diff --git a/send_changelog.py b/send_changelog.py index 039051378b..daaf4cfd68 100644 --- a/send_changelog.py +++ b/send_changelog.py @@ -5,7 +5,7 @@ import requests github_event_before = os.getenv('GITHUB_EVENT_BEFORE') github_sha = os.getenv('GITHUB_SHA') -github_repo = os.getenv('GITHUB_REPO') +github_repository = os.getenv('GITHUB_REPOSITORY') telegram_ci_bot_token = os.getenv('TELEGRAM_CI_BOT_TOKEN') telegram_ci_channel_id = os.getenv('TELEGRAM_CI_CHANNEL_ID') branch = os.getenv('BRANCH') @@ -14,13 +14,13 @@ repository = git.Repo('.') commits_range = f'{github_event_before}...{github_sha}' commits = list(repository.iter_commits(commits_range)) -overview_link = f'https://github.com/{github_repo}/compare/{commits_range}' +overview_link = f'https://github.com/{github_repository}/compare/{commits_range}' overview_link_tag = f'''{len(commits)} new commit{'s' if len(commits) > 1 else ''}''' message = f'''🔨 {overview_link_tag} to lawnchair:{branch}:\n''' for commit in commits: commit_message = commit.message.split('\n')[0] - commit_link = f'https://github.com/{github_repo}/commit/{commit.hexsha}' + commit_link = f'https://github.com/{github_repository}/commit/{commit.hexsha}' commit_link_tag = f'{repository.git.rev_parse(commit.hexsha, short=7)}' encoded_message = html.escape(commit_message) message += f'\n• {commit_link_tag}: {encoded_message}'