fix(tools): update default branch name to main (#41178)
This commit is contained in:
@ -20,12 +20,12 @@ const FilenameResults = ({ searchValue, results, rateLimitMessage }) => {
|
|||||||
return <ListItem number={number} username={username} prTitle={title} />;
|
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 (
|
return (
|
||||||
<Result key={filename}>
|
<Result key={filename}>
|
||||||
<span style={filenameTitle}>{filename}</span>{' '}
|
<span style={filenameTitle}>{filename}</span>{' '}
|
||||||
<a href={fileOnMaster} rel="noopener noreferrer" target="_blank">
|
<a href={fileOnMain} rel="noopener noreferrer" target="_blank">
|
||||||
(File on Master)
|
(File on Main)
|
||||||
</a>
|
</a>
|
||||||
<List>{prs}</List>
|
<List>{prs}</List>
|
||||||
</Result>
|
</Result>
|
||||||
|
@ -137,12 +137,12 @@ class Pareto extends React.Component {
|
|||||||
const prsList = prs.map(({ number, username, title }) => {
|
const prsList = prs.map(({ number, username, title }) => {
|
||||||
return <ListItem key={number} number={number} username={username} prTitle={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 (
|
return (
|
||||||
<Result key={filename}>
|
<Result key={filename}>
|
||||||
<span style={filenameTitle}>{filename}</span>{' '}
|
<span style={filenameTitle}>{filename}</span>{' '}
|
||||||
<a href={fileOnMaster} rel="noopener noreferrer" target="_blank">
|
<a href={fileOnMain} rel="noopener noreferrer" target="_blank">
|
||||||
(File on Master)
|
(File on Main)
|
||||||
</a>
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<details style={detailsStyle}>
|
<details style={detailsStyle}>
|
||||||
|
@ -13,12 +13,12 @@ const PrResults = ({ searchValue, results, rateLimitMessage }) => {
|
|||||||
const elements = results.map((result, idx) => {
|
const elements = results.map((result, idx) => {
|
||||||
const { number, filenames, username, title } = result;
|
const { number, filenames, username, title } = result;
|
||||||
const files = filenames.map((filename, index) => {
|
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 (
|
return (
|
||||||
<li key={`${number}-${index}`}>
|
<li key={`${number}-${index}`}>
|
||||||
{filename}{' '}
|
{filename}{' '}
|
||||||
<a href={fileOnMaster} rel="noopener noreferrer" target="_blank">
|
<a href={fileOnMain} rel="noopener noreferrer" target="_blank">
|
||||||
(File on Master)
|
(File on Main)
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
@ -19,8 +19,6 @@ const getPRs = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const openPRs = await octokit.paginate(octokit.pulls.list, methodProps);
|
const openPRs = await octokit.paginate(octokit.pulls.list, methodProps);
|
||||||
// const openPRs = await octokit.pulls.list(methodProps);
|
|
||||||
// console.log(openPRs[0])
|
|
||||||
return openPRs;
|
return openPRs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ GITHUB_USERNAME='camperbot'
|
|||||||
GITHUB_ACCESS_TOKEN=
|
GITHUB_ACCESS_TOKEN=
|
||||||
REPOSITORY_OWNER='freeCodeCamp'
|
REPOSITORY_OWNER='freeCodeCamp'
|
||||||
REPOSITORY='freeCodeCamp'
|
REPOSITORY='freeCodeCamp'
|
||||||
DEFAULT_BASE='master'
|
DEFAULT_BASE='main'
|
||||||
PORT=3001
|
PORT=3001
|
||||||
MONGO_HOST=mongodb://localhost/contributor-tools
|
MONGO_HOST=mongodb://localhost/contributor-tools
|
||||||
MONGO_PORT=27017
|
MONGO_PORT=27017
|
||||||
|
Reference in New Issue
Block a user