Skip to content
Snippets Groups Projects

PivotalTracker Source Commits Endpoint

Merged gitlab-qa-bot requested to merge service-pivotaltracker into 6-1-stable

Created by: ghost

Hi,

I've added a simple PivotalTracker Service for the Source Commits Endpoint (https://www.pivotaltracker.com/help/api/rest/v5#Source_Commits).

If there's something missing, please let me know.

Thanks for GitLab, it's a great OpenSource Project!

Best Regards

Merge request reports

Merged by avatar (Mar 8, 2025 2:52pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
39 url = 'https://www.pivotaltracker.com/services/v5/source_commits'
40 push[:commits].each do |commit|
41 message = {
42 'source_commit' => {
43 'commit_id' => commit[:id],
44 'author' => commit[:author][:name],
45 'url' => commit[:url],
46 'message' => commit[:message]
47 }
48 }
49 PivotaltrackerService.post(
50 url,
51 body: message.to_json,
52 headers: {
53 'Content-Type' => 'application/json',
54 'X-TrackerToken' => token
  • Created by: dzaporozhets

    remove newline

    By Administrator on 2013-09-25T14:54:40 (imported from GitLab project)

    By Administrator on 2013-09-25T14:54:40 (imported from GitLab)

  • gitlab-qa-bot
  • 31
    32 def fields
    33 [
    34 { type: 'text', name: 'token', placeholder: '' }
    35 ]
    36 end
    37
    38 def execute(push)
    39 url = 'https://www.pivotaltracker.com/services/v5/source_commits'
    40 push[:commits].each do |commit|
    41 message = {
    42 'source_commit' => {
    43 'commit_id' => commit[:id],
    44 'author' => commit[:author][:name],
    45 'url' => commit[:url],
    46 'message' => commit[:message]
    • Created by: dzaporozhets

      Please use better formatting

      message = { 
        'source_commit' => {
          'commit_id' => commit[:id],
          'author' => commit[:author][:name],
          'url' => commit[:url],
          'message' => commit[:message]
        }
      }

      By Administrator on 2013-09-25T14:54:40 (imported from GitLab project)

      By Administrator on 2013-09-25T14:54:40 (imported from GitLab)

  • gitlab-qa-bot
  • 36 end
    37
    38 def execute(push)
    39 url = 'https://www.pivotaltracker.com/services/v5/source_commits'
    40 push[:commits].each do |commit|
    41 message = {
    42 'source_commit' => {
    43 'commit_id' => commit[:id],
    44 'author' => commit[:author][:name],
    45 'url' => commit[:url],
    46 'message' => commit[:message]
    47 }
    48 }
    49 PivotaltrackerService.post(
    50 url,
    51 body: message.to_json,
    • Created by: dzaporozhets

      same here

      By Administrator on 2013-09-25T14:54:40 (imported from GitLab project)

      By Administrator on 2013-09-25T14:54:40 (imported from GitLab)

  • Created by: dzaporozhets

    @johannesbecker i mentioned few improvements. Please ping me when ready

    By Administrator on 2013-09-25T14:11:10 (imported from GitLab project)

    By Administrator on 2013-09-25T14:11:10 (imported from GitLab)

  • Created by: ghost

    Thanks for reviewing!

    @razer6 Added the tests accordingly

    @randx Syntax cleaned up

    By Administrator on 2013-09-25T14:56:06 (imported from GitLab project)

    By Administrator on 2013-09-25T14:56:06 (imported from GitLab)

  • Created by: dzaporozhets

    @johannesbecker good job :thumbsup:

    By Administrator on 2013-09-25T15:31:37 (imported from GitLab project)

    By Administrator on 2013-09-25T15:31:37 (imported from GitLab)

  • Created by: dzaporozhets

    Uh. I did not noticed it is for stable branch :(

    By Administrator on 2013-09-25T15:32:18 (imported from GitLab project)

    By Administrator on 2013-09-25T15:32:18 (imported from GitLab)

  • Created by: dzaporozhets

    @johannesbecker use master branch for new features next time please

    By Administrator on 2013-09-25T15:32:57 (imported from GitLab project)

    By Administrator on 2013-09-25T15:32:57 (imported from GitLab)

  • Created by: ghost

    @randx Sorry, next time I will use master! Thanks for merging.

    By Administrator on 2013-09-25T15:35:08 (imported from GitLab project)

    By Administrator on 2013-09-25T15:35:08 (imported from GitLab)

  • Created by: dzaporozhets

    @johannesbecker thank you. I merged your feature to master too.

    By Administrator on 2013-09-25T15:36:38 (imported from GitLab project)

    By Administrator on 2013-09-25T15:36:38 (imported from GitLab)

  • Please register or sign in to reply
    Loading