Skip to content

Commit e81299e

Browse files
Merge branch 'master' into ENG-8702,ENG-8703,ENG-8704
2 parents eb6853b + 8427b38 commit e81299e

File tree

907 files changed

+3399
-3981
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

907 files changed

+3399
-3981
lines changed

components/azure_devops/azure_devops.app.mjs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { axios } from "@pipedream/platform";
1+
import {
2+
axios, ConfigurationError,
3+
} from "@pipedream/platform";
24
const API_VERSION = "5.0";
35

46
export default {
@@ -28,8 +30,14 @@ export default {
2830
_baseUrl() {
2931
return "https://dev.azure.com";
3032
},
31-
_headers() {
32-
const basicAuth = Buffer.from(`${this._oauthUid()}:${this._oauthAccessToken()}`).toString("base64");
33+
_headers(useOAuth) {
34+
const token = useOAuth
35+
? this._oauthAccessToken()
36+
: this._personalAccessToken();
37+
if (!token && !useOAuth) {
38+
throw new ConfigurationError("Azure DevOps Personal Access Token is required for this operation. Add it to your Azure DevOps connection.");
39+
}
40+
const basicAuth = Buffer.from(`${this._oauthUid()}:${token}`).toString("base64");
3341
return {
3442
Authorization: `Basic ${basicAuth}`,
3543
};
@@ -40,16 +48,20 @@ export default {
4048
_oauthUid() {
4149
return this.$auth.oauth_uid;
4250
},
51+
_personalAccessToken() {
52+
return this.$auth.personal_access_token;
53+
},
4354
_makeRequest(args = {}) {
4455
const {
4556
$ = this,
4657
url,
4758
path,
59+
useOAuth = false,
4860
...otherArgs
4961
} = args;
5062
const config = {
5163
url: url || `${this._baseUrl()}${path}`,
52-
headers: this._headers(),
64+
headers: this._headers(useOAuth),
5365
...otherArgs,
5466
};
5567
config.url += config.url.includes("?")
@@ -61,6 +73,7 @@ export default {
6173
async listAccounts(args = {}) {
6274
const { value } = await this._makeRequest({
6375
url: `https://app.vssps.visualstudio.com/_apis/accounts?memberId=${this._oauthUid()}`,
76+
useOAuth: true,
6477
...args,
6578
});
6679
return value;

components/azure_devops/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/azure_devops",
3-
"version": "0.0.4",
3+
"version": "0.1.0",
44
"description": "Pipedream Azure DevOps Components",
55
"main": "azure_devops.app.mjs",
66
"keywords": [
@@ -13,6 +13,6 @@
1313
"access": "public"
1414
},
1515
"dependencies": {
16-
"@pipedream/platform": "^1.2.1"
16+
"@pipedream/platform": "^3.1.0"
1717
}
1818
}

components/azure_devops/sources/new-event/new-event.mjs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import azureDevops from "../../azure_devops.app.mjs";
22

33
export default {
44
name: "New Event (Instant)",
5-
version: "0.0.2",
5+
version: "0.0.3",
66
key: "azure_devops-new-event",
77
description: "Emit new event for the specified event type.",
88
type: "source",
@@ -40,9 +40,12 @@ export default {
4040
},
4141
eventType: this.eventType,
4242
};
43-
const { id } = await this.azureDevops.createSubscription(this.organization, {
44-
data,
45-
});
43+
const { id } = await this.azureDevops.createSubscription(
44+
this.organization,
45+
{
46+
data,
47+
},
48+
);
4649
this._setHookId(id);
4750
},
4851
async deactivate() {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default {
2+
type: "app",
3+
app: "azure_devops_microsoft_entra_id_oauth",
4+
propDefinitions: {},
5+
methods: {
6+
// this.$auth contains connected account data
7+
authKeys() {
8+
console.log(Object.keys(this.$auth));
9+
},
10+
},
11+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/azure_devops_microsoft_entra_id_oauth",
3+
"version": "0.0.1",
4+
"description": "Pipedream Azure DevOps (Microsoft Entra ID OAuth) Components",
5+
"main": "azure_devops_microsoft_entra_id_oauth.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"azure_devops_microsoft_entra_id_oauth"
9+
],
10+
"homepage": "https://pipedream.com/apps/azure_devops_microsoft_entra_id_oauth",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}

components/confluence/actions/create-page/create-page.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "confluence-create-page",
55
name: "Create Page",
66
description: "Creates a new page in the space. [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-post)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
confluence,

components/confluence/actions/create-post/create-post.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "confluence-create-post",
55
name: "Create Post",
66
description: "Creates a new page or blog post on Confluence. [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-blog-post/#api-blogposts-post)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
type: "action",
99
props: {
1010
confluence,

components/confluence/actions/delete-post/delete-post.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "confluence-delete-post",
55
name: "Delete Post",
66
description: "Removes a blog post from Confluence by its ID. Use with caution, the action is irreversible. [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-blog-post/#api-blogposts-id-delete)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
type: "action",
99
props: {
1010
confluence,

components/confluence/actions/search-content/search-content.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "confluence-search-content",
55
name: "Search Content",
66
description: "Searches for content using the Confluence Query Language (CQL). [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search#api-wiki-rest-api-search-get)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
type: "action",
99
props: {
1010
confluence,

components/confluence/actions/update-post/update-post.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "confluence-update-post",
66
name: "Update a Post",
77
description: "Updates a page or blog post on Confluence by its ID. [See the documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-blog-post/#api-blogposts-id-put)",
8-
version: "0.0.3",
8+
version: "0.0.4",
99
type: "action",
1010
props: {
1111
confluence,

0 commit comments

Comments
 (0)