Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prs fixes #106

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
"request": "launch",
"reAttach": true,
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
"webRoot": "${workspaceFolder}",
"pathMappings": [
{
"url": "webpack://tgstation-server-control-panel/src/components/views/Instance",
"path": "${workspaceFolder}/src/components/views/Instance"
}
]
},
{
"type": "chrome",
Expand Down
2 changes: 2 additions & 0 deletions src/components/views/Instance/Edit/Repository.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export default function Repository(): JSX.Element {
.then(prs => {
if (prs.code === StatusCode.ERROR) {
addError(errorState, prs.error);
setPRs(PRs ?? []);
} else {
setPRs(prs.payload);
Comment on lines 118 to 122
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem is you still cant remove any prs with this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't your change fix that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Negative, the PR list cannot be displayed without info from github and without a pr list, you can see or interact with merged PRs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the PR list cannot be displayed without info from github

We really need to change that so it can work with the existing test merge list

if (resetDesiredState) reloadDesiredState(repositoryInfo, true);
Expand All @@ -127,6 +128,7 @@ export default function Repository(): JSX.Element {
errorState,
new InternalError(ErrorCode.APP_FAIL, { jsError: e as Error })
);
setPRs(PRs ?? []);
});
}
}
Expand Down
10 changes: 4 additions & 6 deletions src/translations/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"navbar.logout": "Logout",
"app.job.started": "Started: ",
"app.job.startedby": "Started By: ",
"app.job.stopped": "Stopped: ",
"app.job.stoppedby": "Stopped By: ",
"app.job.stopped": "Cancelled: ",
"app.job.stoppedby": "Cancelled By: ",
"error.http.access_denied.desc": "Access to this resource is denied",
"error.unhandled_response.desc": "The application received an unexpected response",
"error.unhandled_global_response.desc": "The application received an unexpected global response",
Expand Down Expand Up @@ -262,7 +262,7 @@
"view.instance.repo.pending.title": "Pending Changes",
"view.instance.repo.pending.none": "No pending changes",
"view.instance.repo.pending.reapply": "Retestmerge #{number} ({title}) at commit {commit}",
"view.instance.repo.pending.reset": "Reset repository to tracked reference",
"view.instance.repo.pending.reset": "Reset repository to tracked remote reference",
"view.instance.repo.pending.reset.nobranch": "Recheckout commit {commit}",
"view.instance.repo.pending.update": "Merge changes from origin",
"view.instance.repo.pending.added": "Testmerge #{number} ({title}) at commit {commit}",
Expand All @@ -272,7 +272,7 @@
"view.instance.repo.pending.renamed": "Change the comment on #{number}",
"view.instance.repo.update": "Update repository from origin",
"view.instance.repo.update.desc": "This option will add new changes from the remote repository to the local",
"view.instance.repo.reset": "Reset repository to origin",
"view.instance.repo.reset": "Reset repository to origin first",
"view.instance.repo.reset.desc": "This option will reset the repository to the tracked origin, updating the repository and clearing any test merged PRs",
"view.instance.repo.manual": "Manual PR Entry",
"view.instance.repo.manual.desc": "Use this box to manually test merge a PR by entering its number and clicking add pr",
Expand Down Expand Up @@ -372,8 +372,6 @@
"config.showjson.desc": "Most pages will display the underlying json data if enabled.",
"config.manualpr": "Show manual PR entry on repository page",
"config.manualpr.desc": "Controls whether or not an input box is displayed to manually testmerge a pr based on its PR number. This option is ignored and the manual PR entry box is always displayed when using a repository hosted on GitLab.",
"config.manualreset": "Show force reset switch on repository page",
"config.manualreset.desc": "Controls whether or not an input box is displayed to force a repository reset. This option is ignored and the manual PR entry box is always displayed when using a repository hosted on GitLab.",
"loading.loading": "Loading...",
"loading.login": "Logging in...",
"loading.page": "Loading page: ",
Expand Down