mirror of
https://github.com/unitedstates/congress-legislators.git
synced 2025-12-19 09:50:37 -05:00
a few other fixes where master should have been changed to main (#786)
This commit is contained in:
@@ -23,7 +23,7 @@ File | Download | Description
|
|||||||
|
|
||||||
The data formats are documented below.
|
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:
|
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:
|
||||||
|
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class CongressLookup:
|
|||||||
def database_access(self,filename):
|
def database_access(self,filename):
|
||||||
if self.args.download:
|
if self.args.download:
|
||||||
if self.args.repo[-1] != '/': self.args.repo += '/'
|
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
|
# contextlib required for urlopen in with ... as for v < 3.3
|
||||||
res = contextlib.closing(urlopen( urlparse.urljoin(url_base,filename) ))
|
res = contextlib.closing(urlopen( urlparse.urljoin(url_base,filename) ))
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ def run():
|
|||||||
|
|
||||||
|
|
||||||
def contact_steps_for(bioguide):
|
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))
|
response = urlopen(base_url.format(bioguide=bioguide))
|
||||||
if response.code == 404:
|
if response.code == 404:
|
||||||
raise LegislatorNotFoundError("%s not found in unitedstates/contact-congress!" % bioguide)
|
raise LegislatorNotFoundError("%s not found in unitedstates/contact-congress!" % bioguide)
|
||||||
|
|||||||
@@ -39,16 +39,16 @@ fi
|
|||||||
# Create a branch with the name of the script, the date, and a random string to prevent accidental collisions.
|
# 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)
|
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 fetch
|
||||||
git checkout -b $BRANCH_NAME master
|
git checkout -b $BRANCH_NAME main
|
||||||
|
|
||||||
# Run the script.
|
# Run the script.
|
||||||
echo Running $@...
|
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
|
if git diff-files --quiet --ignore-submodules; then
|
||||||
echo No changes.;
|
echo No changes.;
|
||||||
git checkout master;
|
git checkout main;
|
||||||
git branch -d $BRANCH_NAME;
|
git branch -d $BRANCH_NAME;
|
||||||
exit;
|
exit;
|
||||||
fi
|
fi
|
||||||
@@ -63,7 +63,7 @@ if [ $PUSH -gt 0 ]; then
|
|||||||
if hub pull-request -m "[auto] $CMD run at `date "+%FT%T"`"; 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
|
# Success, so we can delete our local copy. Use -D to force delete
|
||||||
# even though it's not merged.
|
# even though it's not merged.
|
||||||
git checkout master;
|
git checkout main;
|
||||||
git branch -D $BRANCH_NAME;
|
git branch -D $BRANCH_NAME;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user