From 84a61236d135b0c029201afd546af0cf095c38ff Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Thu, 25 May 2023 08:47:25 -0500 Subject: [PATCH 1/2] Add github token to skip actions CI build on initial repo commit --- metecho/api/jobs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/metecho/api/jobs.py b/metecho/api/jobs.py index c8a6d9e43..a8763829a 100644 --- a/metecho/api/jobs.py +++ b/metecho/api/jobs.py @@ -281,7 +281,7 @@ def create_repository( git config user.name '{user.get_full_name() or user.username}'; git config user.email '{user.email}'; git add --all; - git commit -m 'Bootstrap project (via Metecho)'; + git commit -m 'Bootstrap project (via Metecho) [ci-skip]'; git push https://{user_gh.session.auth.token}@github.com/{repo.full_name}.git {branch_name}; """, # noqa: B950 shell=True, @@ -762,7 +762,6 @@ def delete_scratch_org(scratch_org, *, originating_user_id): def refresh_github_repositories_for_user(user: User): - try: repos = get_all_org_repos(user) with transaction.atomic(): From 8183e74c3bb4b19357e49ebb7fea4ff95f9b5107 Mon Sep 17 00:00:00 2001 From: Jason Lantz Date: Thu, 25 May 2023 10:56:12 -0500 Subject: [PATCH 2/2] Fix ci skip string --- metecho/api/jobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metecho/api/jobs.py b/metecho/api/jobs.py index a8763829a..c464a9a72 100644 --- a/metecho/api/jobs.py +++ b/metecho/api/jobs.py @@ -281,7 +281,7 @@ def create_repository( git config user.name '{user.get_full_name() or user.username}'; git config user.email '{user.email}'; git add --all; - git commit -m 'Bootstrap project (via Metecho) [ci-skip]'; + git commit -m 'Bootstrap project (via Metecho) [ci skip]'; git push https://{user_gh.session.auth.token}@github.com/{repo.full_name}.git {branch_name}; """, # noqa: B950 shell=True,