AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
import { createAction } from '@activepieces/pieces-framework';
import { gitlabAuth } from '../../auth';
import { encodeSegment, gitlabRequest, projectPath } from '../../common/client';
import { gitlabProps } from '../../common/props';
import { commitOutputSchema } from '../../output-schemas';
export const getCommitAction = createAction({
auth: gitlabAuth,
name: 'get_commit',
displayName: 'Get Commit',
description: 'Gets one commit by SHA, branch or tag.',
audience: 'ai',
classification: 'READ',
aiMetadata: {
description:
'Returns one GitLab commit (message, author, dates, parent SHAs, line stats, web URL) by SHA or by a branch or tag name, which resolves to its latest commit.',
idempotent: true,
},
props: {
projectId: gitlabProps.projectId(),
sha: gitlabProps.sha(),
},
outputSchema: commitOutputSchema,
async run({ auth, propsValue }) {
return gitlabRequest({
auth,
method: 'GET',
path: `${projectPath(
propsValue.projectId
)}/repository/commits/${encodeSegment({
value: propsValue.sha,
label: 'Commit SHA',
})}`,
query: { stats: true },
});
},
});