New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rujira

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rujira

  • 0.1.10
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Rujira

Running

RUJIRA_DEBUG=true RUJIRA_URL=http://localhost:8080 RUJIRA_TOKEN=<JIRA_ACCESS_TOKEN> bundle exec ./bin/console

Usage in the code

name = Rujira::Api::Myself.get.name
Rujira::Api::Project.get 'ITMG'
Rujira::Api::Issue.create do
    data fields: {
         project: { key: 'ITMG' },
         summary: 'BOT: added a new feature.',
         description: 'This task was generated by the bot when creating changes in the repository.',
         issuetype: { name: 'Task' },
         labels: ['bot'] }
    params updateHistory: true
end
Rujira::Api::Issue.watchers 'ITMG-1', 'wilful'
Rujira::Api::Issue.get 'ITMG-1'
result = Rujira::Api::Search.get do
    data jql: 'project = ITMG and status IN ("To Do", "In Progress") ORDER BY issuekey',
         maxResults: 10,
         startAt: 0,
         fields: ['id', 'key']
end
result.iter
Rujira::Api::Issue.comment 'ITMG-1' do
    data body: 'Adding a new comment'
end
Rujira::Api::Issue.edit 'ITMG-1' do
    data update: {
         labels:[{add: 'rujira'},{remove: 'bot'}],
        },
        fields: {
        assignee: { name: name },
        summary: 'This is a shorthand for a set operation on the summary field'
    }
end
Rujira::Api::Issue.attachments 'ITMG-1', 'upload.png'
Rujira::Api::Issue.del 'ITMG-1'

Rake tasks

require 'rujira/tasks/jira'
rake jira::whoami
rake jira:create -- '--project=ITMG' \
    '--summary=The short summary information' \
    '--description=The base description of task' \
    '--issuetype=Task'
rake jira:search -- '-q project = ITMG'
rake jira:attach -- '--file=upload.png' '--issue=ITMG-1'

Testing

Run the instance of jira

docker compose up -d
open http://localhost:8080

Example with Curl

curl -H "Authorization: Bearer <JIRA_ACCESS_TOKEN>" 'http://localhost:8080/rest/api/2/search?expand=summary'
curl -vv -X POST --data '"some"' -H "Authorization: Bearer <JIRA_ACCESS_TOKEN>" -H "Content-Type: application/json" 'http://localhost:8080/rest/api/2/issue/ITMG-70/watchers'
curl -D- -F "file=@upload.png" -X POST -H "X-Atlassian-Token: nocheck" \
    -H "Authorization: Bearer <JIRA_ACCESS_TOKEN>" 'http://localhost:8080/rest/api/2/issue/ITMG-70/attachments'

FAQs

Package last updated on 05 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc