Sign inSign up

fourdollars/launchpad-bug-resource

By fourdollars

Updated 6 months ago

Watch the Launchpad bug status changes by using https://api.launchpad.net/.

Image
0

3.0K

fourdollars/launchpad-bug-resource repository overview

GitHub: fourdollars/launchpad-bug-resource License: MIT Bash Docker Docker Pulls

launchpad-bug-resource

concourse-ci's launchpad-bug-resource to watch the Launchpad bug status changes by using https://api.launchpad.net/.

Config

Resource Type
resource_types:
- name: resource-launchpad-bug
  type: registry-image
  source:
    repository: fourdollars/launchpad-bug-resource
    tag: latest
  defaults:
    oauth_consumer_key: test
    oauth_token: csjrGznX4Jq59CB8941N
    oauth_token_secret: wxDNqsCLxzrmhb2K27FRGjc7hdp3zQk0b4N8cnfRzVHnJfCFlHgkGHxDk5qMPTSdQFSsllS4dwGBD18Q

or

resource_types:
- name: resource-launchpad-bug
  type: registry-image
  source:
    repository: ghcr.io/fourdollars/launchpad-bug-resource
    tag: latest
  defaults:
    oauth_consumer_key: test
    oauth_token: csjrGznX4Jq59CB8941N
    oauth_token_secret: wxDNqsCLxzrmhb2K27FRGjc7hdp3zQk0b4N8cnfRzVHnJfCFlHgkGHxDk5qMPTSdQFSsllS4dwGBD18Q
Resource
  • oauth_consumer_key: required, choose what you like.
  • oauth_token: required, run oauth_consumer_key=what_you_like ./launchpad-api to get it in ~/.config/launchpad/what_you_like.
  • oauth_token_secret: required, run oauth_consumer_key=what_you_like ./launchpad-api to get it in ~/.config/launchpad/what_you_like.
  • id: optional, the bug id or bug id list.
  • project: optional, Specify the project name to search bugs.
  • tag: optional, the tag or tag list. Specify the tag when it searches for the project.
  • status: optional, one status of "New", "Incomplete", "Opinion", "Invalid", "Won't Fix", "Expired", "Confirmed", "Triaged", "In Progress", "Fix Committed", "Fix Released", "Unknown" or the list. Specify the status when it searches for the project.
  • combinator: 'any' or 'all'. Specify the tag combinator when it searches for the project. 'any' by default.
  • modified_since: optional, it is disabled by default. When it is enabled, it will only check those modified bugs since the date last updated.
  • created_before: optional, it is disabled by default. When it is enabled, it will search for bugs that were created before the given date
  • created_since: optional, it is disabled by default. When it is enabled, it will search for bugs that were created since the given date
  • auto_mode: optional, it is disabled by default. When it is enabled, it will use the date_last_updated of bugs last time as the next modified_since.
  • parallel: optional, it is disabled by default. When it is enabled, it will use GNU Parallel.
resources:
- name: bugs
  icon: bug-outline
  type: resource-launchpad-bug
  check_every: 10m
  source:
    id: 1

or

resources:
- name: bugs
  icon: bug-outline
  type: resource-launchpad-bug
  check_every: 10m
  source:
    project: linux
    tag:
      - focal
      - apport-collected
    combinator: all

or

resources:
- name: bugs
  icon: bug-outline
  type: resource-launchpad-bug
  check_every: 10m
  source:
    project: linux
    id:
      - 1
      - 10
      - 100
    tag:
      - focal
      - apport-collected
    combinator: all
Example
jobs:
- name: check-bugs
  plan:
  - get: bugs
    trigger: true
  - task: check
    config:
      platform: linux
      image_resource:
        type: registry-image
        source:
          repository: alpine
          tag: latest
      inputs:
        - name: bugs
      run:
        path: sh
        args:
        - -exc
        - |
          apk add jq
          for json in bugs/*.json; do
            echo "= $json ="
            id=$(jq -r .id < "$json")
            jq -r '"Title: " + .title + "\n" + .description' < "$json"
            jq -r '.entries | .[] | .bug_target_name + ": " + .status' < bugs/tasks/"$id".json
          done

Tag summary

Content type

Image

Digest

sha256:cd8e4480a

Size

43.7 MB

Last updated

6 months ago

docker pull fourdollars/launchpad-bug-resource