fix(tools): update default branch name to main (#41178)

This commit is contained in:
Randell Dawson
2021-02-18 13:41:50 -07:00
committed by GitHub
parent 950841c25e
commit e8cfefd1bb
5 changed files with 10 additions and 12 deletions

View File

@ -20,12 +20,12 @@ const FilenameResults = ({ searchValue, results, rateLimitMessage }) => {
return <ListItem number={number} username={username} prTitle={title} />;
});
const fileOnMaster = `https://github.com/freeCodeCamp/freeCodeCamp/blob/master/${filename}`;
const fileOnMain = `https://github.com/freeCodeCamp/freeCodeCamp/blob/main/${filename}`;
return (
<Result key={filename}>
<span style={filenameTitle}>{filename}</span>{' '}
<a href={fileOnMaster} rel="noopener noreferrer" target="_blank">
(File on Master)
<a href={fileOnMain} rel="noopener noreferrer" target="_blank">
(File on Main)
</a>
<List>{prs}</List>
</Result>

View File

@ -137,12 +137,12 @@ class Pareto extends React.Component {
const prsList = prs.map(({ number, username, title }) => {
return <ListItem key={number} number={number} username={username} prTitle={title} />;
});
const fileOnMaster = `https://github.com/freeCodeCamp/freeCodeCamp/blob/master/${filename}`;
const fileOnMain = `https://github.com/freeCodeCamp/freeCodeCamp/blob/main/${filename}`;
return (
<Result key={filename}>
<span style={filenameTitle}>{filename}</span>{' '}
<a href={fileOnMaster} rel="noopener noreferrer" target="_blank">
(File on Master)
<a href={fileOnMain} rel="noopener noreferrer" target="_blank">
(File on Main)
</a>
<br />
<details style={detailsStyle}>

View File

@ -13,12 +13,12 @@ const PrResults = ({ searchValue, results, rateLimitMessage }) => {
const elements = results.map((result, idx) => {
const { number, filenames, username, title } = result;
const files = filenames.map((filename, index) => {
const fileOnMaster = `https://github.com/freeCodeCamp/freeCodeCamp/blob/master/${filename}`;
const fileOnMain = `https://github.com/freeCodeCamp/freeCodeCamp/blob/main/${filename}`;
return (
<li key={`${number}-${index}`}>
{filename}{' '}
<a href={fileOnMaster} rel="noopener noreferrer" target="_blank">
(File on Master)
<a href={fileOnMain} rel="noopener noreferrer" target="_blank">
(File on Main)
</a>
</li>
);

View File

@ -19,8 +19,6 @@ const getPRs = async () => {
};
const openPRs = await octokit.paginate(octokit.pulls.list, methodProps);
// const openPRs = await octokit.pulls.list(methodProps);
// console.log(openPRs[0])
return openPRs;
};

View File

@ -2,7 +2,7 @@ GITHUB_USERNAME='camperbot'
GITHUB_ACCESS_TOKEN=
REPOSITORY_OWNER='freeCodeCamp'
REPOSITORY='freeCodeCamp'
DEFAULT_BASE='master'
DEFAULT_BASE='main'
PORT=3001
MONGO_HOST=mongodb://localhost/contributor-tools
MONGO_PORT=27017