Skip to content

Commit

Permalink
Merge pull request #10 from apendo-c8/update-deprecated-urls
Browse files Browse the repository at this point in the history
update deprecated urls & rename source input
  • Loading branch information
KristofferHogberg authored Jan 11, 2024
2 parents a58de07 + c443e13 commit 9edbbbd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You can simply refer to this GitHub action in any GitHub workflow.:
- name: Tag BPMN Models
uses: apendo-c8/tag-bpmn-models@v1
with:
source: 'Project Id'
project_id: 'Project Id'
tag: 'Tag name (${{ github.ref_name }} will reference the latest pushed tag or branch)'
client_id: 'Camunda Modeler API client id'
client_secret: 'Camunda Modeler API client secret'
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: 'GitHub Action for automated tagging of BPMN models'
author: "Kristoffer Högberg"

inputs:
source:
project_id:
description: 'Camunda modeler project id'
required: true
tag:
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
const core_1 = __nccwpck_require__(2186);
const axios_1 = __importDefault(__nccwpck_require__(8757));
const TAG = (0, core_1.getInput)('tag');
const SOURCE = (0, core_1.getInput)('source');
const SOURCE = (0, core_1.getInput)('project_id');
const MODELER_CLIENT_ID = (0, core_1.getInput)('client_id');
const MODELER_CLIENT_SECRET = (0, core_1.getInput)('client_secret');
const getToken = async () => {
Expand Down Expand Up @@ -47,7 +47,7 @@ const getToken = async () => {
};
const getFileIdsByProjectId = async (token) => {
try {
const urlMilestone = 'https://modeler.cloud.camunda.io/api/beta/files/search';
const urlMilestone = 'https://modeler.cloud.camunda.io/api/v1/files/search';
// TODO: page can not be larger than 50?
const body = {
"filter": {
Expand All @@ -67,7 +67,7 @@ const getFileIdsByProjectId = async (token) => {
};
const setMilestone = async (token, fileId) => {
try {
const urlMilestone = 'https://modeler.cloud.camunda.io/api/beta/milestones';
const urlMilestone = 'https://modeler.cloud.camunda.io/api/v1/milestones';
const body = {
"name": TAG, "fileId": fileId
};
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {getInput, setFailed} from "@actions/core";
import axios from "axios";

const TAG = getInput('tag');
const SOURCE = getInput('source');
const SOURCE = getInput('project_id');
const MODELER_CLIENT_ID = getInput('client_id')
const MODELER_CLIENT_SECRET = getInput('client_secret')

Expand Down Expand Up @@ -43,7 +43,7 @@ const getToken = async () => {
const getFileIdsByProjectId = async (token: string) => {

try {
const urlMilestone = 'https://modeler.cloud.camunda.io/api/beta/files/search';
const urlMilestone = 'https://modeler.cloud.camunda.io/api/v1/files/search';

// TODO: page can not be larger than 50?
const body = {
Expand All @@ -69,7 +69,7 @@ const getFileIdsByProjectId = async (token: string) => {
const setMilestone = async (token: string, fileId: string) => {

try {
const urlMilestone = 'https://modeler.cloud.camunda.io/api/beta/milestones';
const urlMilestone = 'https://modeler.cloud.camunda.io/api/v1/milestones';

const body = {
"name": TAG, "fileId": fileId
Expand Down

0 comments on commit 9edbbbd

Please sign in to comment.