Skip to content

Commit 558ccad

Browse files
authored
fix: update repoUrl project-wide (#86)
### Description <!-- Please add PR description (don't leave blank) - example: This PR [adds/removes/fixes/replaces] the [feature/bug/etc] --> This Pull Request updates all instance of old organization name in the repoUrl project-wide following the decision of change org name from `devjargons` to `jargonsdev`. #### Changes Made - Updated giturl in README - Updated project url to the Contribution guide in `dev/setup` script - Factored in new name in function params in `submit-word` script and `dictionary` api handler, by updating `devJargonsOctokit` to `jargonsdevOctokit` ### Related Issue <!-- Please prefix the issue number with Fixes/Resolves - example: Fixes #123 or Resolves #123 --> NA ### Screenshots/Screencasts <!-- Please provide screenshots or video recording that demos your changes (especially if it's a visual change) --> NA ### Notes to Reviewer <!-- Please state here if you added a new npm packages, or any extra information that can help reviewer better review you changes --> NA
1 parent 2ead12d commit 558ccad

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align="center" style="margin-top: 12px">
22
<a href="https://www.jargons.dev">
3-
<img width="700" alt="jargons.dev" src="https://github.com/devjargons/jargons.dev/assets/25631971/5d1db25d-18e0-4544-ac98-9aa4e1097e14">
3+
<img width="700" alt="jargons.dev" src="https://github.com/jargonsdev/jargons.dev/assets/25631971/5d1db25d-18e0-4544-ac98-9aa4e1097e14">
44
</a>
55
<h1><tt>jargons.dev</tt></h1>
66
<h3>The Software Engineering Dictionary</h3>
@@ -33,7 +33,7 @@ To get set-up follow these steps:
3333
1. Clone the repository:
3434

3535
```sh
36-
git clone https://github.com/devjargons/jargons.dev.git
36+
git clone https://github.com/jargonsdev/jargons.dev.git
3737
```
3838

3939
2. Navigate to the project directory:

dev/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import registerGitHubApp from "./lib/register-github-app/index.js";
66
const appCredentials = await registerGitHubApp({
77
// name of your app
88
name: "jargons.dev-app-for-",
9-
url: "https://github.com/devjargons/jargons.dev/CONTRIBUTING.md",
9+
url: "https://github.com/jargonsdev/jargons.dev/CONTRIBUTING.md",
1010
default_permissions: {
1111
issues: "write",
1212
}

src/lib/submit-word.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import editWordPRTemp from "./templates/edit-word-pr.md.js";
44

55
/**
66
* Submit word - create a Pull Request to add word to project repository
7-
* @param {import("octokit").Octokit} devJargonsOctokit
7+
* @param {import("octokit").Octokit} jargonsdevOctokit
88
* @param {import("octokit").Octokit} userOctokit
99
* @param {"new" | "edit"} action
1010
* @param {{ repoFullname: string, repoMainBranchRef: string }} projectRepoDetails
@@ -13,7 +13,7 @@ import editWordPRTemp from "./templates/edit-word-pr.md.js";
1313
*
1414
* @todo implement (submit as) `draft` feature - [idea]
1515
*/
16-
export async function submitWord(devJargonsOctokit, userOctokit, action, projectRepoDetails, forkedRepoDetails, word) {
16+
export async function submitWord(jargonsdevOctokit, userOctokit, action, projectRepoDetails, forkedRepoDetails, word) {
1717
const { repoFullname, repoMainBranchRef } = projectRepoDetails;
1818
const { repoName, repoOwner } = getRepoParts(repoFullname);
1919
const { repoOwner: forkedRepoOwner } = getRepoParts(forkedRepoDetails.repoFullname);
@@ -38,8 +38,8 @@ export async function submitWord(devJargonsOctokit, userOctokit, action, project
3838
maintainers_can_modify: true
3939
});
4040

41-
// DevJargons (bot) App adds related labels to PR
42-
await devJargonsOctokit.request("POST /repos/{owner}/{repo}/issues/{issue_number}/labels", {
41+
// jargons-dev (bot) App adds related labels to PR
42+
await jargonsdevOctokit.request("POST /repos/{owner}/{repo}/issues/{issue_number}/labels", {
4343
owner: repoOwner,
4444
repo: repoName,
4545
issue_number: response.data.number,

src/pages/api/dictionary.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function POST({ request, cookies }) {
3838
const metadata = JSON.parse(data.get("metadata"));
3939

4040
const userOctokit = app.getUserOctokit({ token: accessToken.value });
41-
const devJargonsOctokit = app.octokit;
41+
const jargonsdevOctokit = app.octokit;
4242

4343
// Fork repo
4444
const fork = await forkRepository(userOctokit, PROJECT_REPO_DETAILS);
@@ -87,7 +87,7 @@ export async function POST({ request, cookies }) {
8787

8888
// submit the edit in new pr
8989
const wordSubmission = await submitWord(
90-
devJargonsOctokit,
90+
jargonsdevOctokit,
9191
userOctokit,
9292
action,
9393
PROJECT_REPO_DETAILS,
@@ -147,7 +147,7 @@ export async function DELETE({ request, cookies }) {
147147
// const metadata = JSON.parse(data.get("metadata"));
148148

149149
const userOctokit = app.getUserOctokit({ token: accessToken.value });
150-
// const devJargonsOctokit = app.octokit;
150+
// const jargonsdevOctokit = app.octokit;
151151

152152
// Fork repo
153153
const fork = await forkRepository(userOctokit, PROJECT_REPO_DETAILS);

0 commit comments

Comments
 (0)