-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
TM Comment Consolidation in Github/Gitlab #2131
base: dev
Are you sure you want to change the base?
Conversation
Setup GitLab GraphQL client and replace one call
Gitlab comment consolidation
Thank you for contributing to tgstation-server! The CI Pipeline workflow requires repository secrets and will not run without approval. Maintainers can add the |
This reverts commit 4bec6d1.
Repos I experimented on: Drulikar/cmss13#2 |
mergeRequest(iid: $number) { | ||
iid | ||
id | ||
notes { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting that we likely need to paginate any connections we're querying in the future but I'll wait for someone to complain about it
...Tgstation.Server.Host.Utils.GitLab.GraphQL/Tgstation.Server.Host.Utils.GitLab.GraphQL.csproj
Show resolved
Hide resolved
"devDependencies": { | ||
"apollo": "^2.34.0" | ||
}, | ||
"packageManager": "[email protected]+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the wrong version but that's my fault I think. Reminder to myself to fix after merging
query GetMergeRequests($project: ID!, $numbers: [String!]!) { | ||
project(fullPath: $project) { | ||
mergeRequests(iids: $numbers) { | ||
nodes { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pointing out another connection that needs paginating eventually
src/Tgstation.Server.Host.Utils.GitLab.GraphQL/GraphQLGitLabClientFactory.cs
Outdated
Show resolved
Hide resolved
src/Tgstation.Server.Host/Components/Deployment/Remote/GitHubRemoteDeploymentManager.cs
Outdated
Show resolved
Hide resolved
src/Tgstation.Server.Host/Components/Deployment/Remote/GitLabRemoteDeploymentManager.cs
Outdated
Show resolved
Hide resolved
src/Tgstation.Server.Host/Utils/GitHub/IAuthenticatedGitHubService.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Jordan Dominion <[email protected]>
🆑
Transitioned GitLab API to GraphQL due to incomplete implementation (namely for MR notes) in the abandoned API.
The option "Post comment when test merge is deployed" will now be consolidated into one message (until it approaches comment limit). In other words, rather than a new message each deployment, an existing message (if it exists) will be edited with a new line. The content of the message has also been altered.
/🆑
TGS creates a lot of noise currently on PRs, and this attempts to put it all in one message.
Github testing (I had to fix the timestamp and comment handling):

Gitlab testing (I had to fix the heading having line endings that differ):
