From caa1435a27b710387abd43600058adabdcc31268 Mon Sep 17 00:00:00 2001 From: James Turk Date: Wed, 16 Jun 2021 15:04:39 -0400 Subject: [PATCH] a few other fixes where master should have been changed to main (#786) --- README.md | 2 +- congress_lookup.py | 2 +- scripts/contact_forms.py | 2 +- scripts/run_script_to_branch | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a4e98a8..5367b34 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ File | Download | Description The data formats are documented below. -The files are maintained in [YAML](http://www.yaml.org/) format in the master branch of this project. YAML is a serialization format similar in structure to JSON but typically written with one field per line. Like JSON, it allows for nested structure. Each level of nesting is indicated by indentation or a dash. CSV and JSON formatted files are also provided in the `gh-pages` branch --- they're linked above. +The files are maintained in [YAML](http://www.yaml.org/) format in the main branch of this project. YAML is a serialization format similar in structure to JSON but typically written with one field per line. Like JSON, it allows for nested structure. Each level of nesting is indicated by indentation or a dash. CSV and JSON formatted files are also provided in the `gh-pages` branch --- they're linked above. This database is maintained through a combination of manual edits by volunteers (from [GovTrack](https://www.govtrack.us), [ProPublica](https://projects.propublica.org/represent/), [MapLight](https://maplight.org/), [FiveThirtyEight](https://fivethirtyeight.com/), and others) and automated imports from a variety of sources including: diff --git a/congress_lookup.py b/congress_lookup.py index 8ddb61f..9ffa8ab 100644 --- a/congress_lookup.py +++ b/congress_lookup.py @@ -121,7 +121,7 @@ class CongressLookup: def database_access(self,filename): if self.args.download: if self.args.repo[-1] != '/': self.args.repo += '/' - url_base = urlparse.urljoin(urlparse.urlunparse(urlparse.urlparse(self.args.repo)._replace(netloc='raw.githubusercontent.com')),'master/') + url_base = urlparse.urljoin(urlparse.urlunparse(urlparse.urlparse(self.args.repo)._replace(netloc='raw.githubusercontent.com')),'main/') # contextlib required for urlopen in with ... as for v < 3.3 res = contextlib.closing(urlopen( urlparse.urljoin(url_base,filename) )) else: diff --git a/scripts/contact_forms.py b/scripts/contact_forms.py index ab9dd8a..a48b824 100755 --- a/scripts/contact_forms.py +++ b/scripts/contact_forms.py @@ -59,7 +59,7 @@ def run(): def contact_steps_for(bioguide): - base_url = "https://raw.githubusercontent.com/unitedstates/contact-congress/master/members/{bioguide}.yaml" + base_url = "https://raw.githubusercontent.com/unitedstates/contact-congress/main/members/{bioguide}.yaml" response = urlopen(base_url.format(bioguide=bioguide)) if response.code == 404: raise LegislatorNotFoundError("%s not found in unitedstates/contact-congress!" % bioguide) diff --git a/scripts/run_script_to_branch b/scripts/run_script_to_branch index 606e4d7..4ab34d2 100755 --- a/scripts/run_script_to_branch +++ b/scripts/run_script_to_branch @@ -39,16 +39,16 @@ fi # Create a branch with the name of the script, the date, and a random string to prevent accidental collisions. BRANCH_NAME=$1_`date +%Y%m%d`_$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6 | head -n 1) git fetch -git checkout -b $BRANCH_NAME master +git checkout -b $BRANCH_NAME main # Run the script. echo Running $@... ./$@ -# If there were no changes. Return to the master branch and then delete our temporary branch. +# If there were no changes. Return to the main branch and then delete our temporary branch. if git diff-files --quiet --ignore-submodules; then echo No changes.; - git checkout master; + git checkout main; git branch -d $BRANCH_NAME; exit; fi @@ -63,7 +63,7 @@ if [ $PUSH -gt 0 ]; then if hub pull-request -m "[auto] $CMD run at `date "+%FT%T"`"; then # Success, so we can delete our local copy. Use -D to force delete # even though it's not merged. - git checkout master; + git checkout main; git branch -D $BRANCH_NAME; fi fi