From 74a645a31e4e4da2d1fa4a8015c7e44cf9ba30b7 Mon Sep 17 00:00:00 2001 From: Adam Harrison-Fuller <adam@adamhf.io> Date: Wed, 27 Mar 2019 17:13:17 +0000 Subject: [PATCH] Updating readme and adding example conf. Signed-off-by: Adam Harrison-Fuller <adam@adamhf.io> --- README.md | 16 ++++++++++++---- config.yaml.example | 8 ++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 config.yaml.example diff --git a/README.md b/README.md index 59bfa48..d558597 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,21 @@ # Gitlab RSS Sync -Create Gitlab issues from RSS Feeds +Create Gitlab issues from RSS Feeds with optional labelling. Created to monitor RSS feeds and bring posts to +our attention (Security Releases, Product Updates etc) ## Config file -```$yaml + +The config file **MUST** be named config.yaml, an example one is provided [here](config.yaml.example). Below is a brief + description of its contents. + +```yaml interval: 300 // Interval in seconds to check the RSS feeds. feeds: - id: test //Specify a feed ID that is used internally for duplicate detection. feed_url: http://example.com/rss.xml // The Feed URL. name: Test Feed // A User friendly display name. gitlab_project_id: 12345 // The Gitlab project ID to create issues under. - labels: // A list of labels to add to created Issues. + added_since: "2019-03-27T15:00:00Z" // (Optional) For longer RSS feeds specify a date to exclude items published/updated earlier than this + labels: // (Optional) A list of labels to add to created Issues. - TestLabel - id: ... ``` @@ -28,4 +34,6 @@ Make sure the location of your DATA_DIR environment variable is set to a persist that is contained within it stores the state of which RSS items have already been synced. ### Run it -`docker run -e GITLAB_API_TOKEN=<INSERT_TOKEN> -e DATA_DIR=/data -e CONFIG_DIR=/app -v <PATH_TO_DATA_DIR>:/data -v <PATH_TO_CONFIG_DIR>/config adamhf/rss-sync:latest` \ No newline at end of file +```sh +docker run -e GITLAB_API_TOKEN=<INSERT_TOKEN> -e DATA_DIR=/data -e CONFIG_DIR=/app -v <PATH_TO_DATA_DIR>:/data -v <PATH_TO_CONFIG_DIR>/config adamhf/rss-sync:latest +``` \ No newline at end of file diff --git a/config.yaml.example b/config.yaml.example new file mode 100644 index 0000000..f8d81e3 --- /dev/null +++ b/config.yaml.example @@ -0,0 +1,8 @@ +interval: 300 +feeds: + - id: reddit + feed_url: https://www.reddit.com/.rss + name: Reddit Front Page + gitlab_project_id: 12345678 + labels: + - Reddit -- GitLab