sfmc-sdk 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,8 +9,15 @@ updates:
9
9
  directory: '/' # Location of package manifests
10
10
  schedule:
11
11
  interval: 'daily'
12
- ignore:
13
- - dependency-name: 'p-limit' #v4 only supports ESM so keeping on v3
14
- target-branch: 'develop'
12
+ target-branch: 'main'
15
13
  labels:
16
14
  - 'chore'
15
+ - 'dependencies'
16
+ - package-ecosystem: 'github-actions'
17
+ directory: '/'
18
+ schedule:
19
+ interval: 'weekly'
20
+ target-branch: 'main'
21
+ labels:
22
+ - 'dependencies'
23
+ - 'github-action'
@@ -0,0 +1,55 @@
1
+ name: Sync Milestone from Issue
2
+ on:
3
+ pull_request:
4
+ types: [opened, edited, reopened]
5
+
6
+ jobs:
7
+ sync-milestone:
8
+ runs-on: ubuntu-latest
9
+ permissions:
10
+ issues: read
11
+ pull-requests: write
12
+ steps:
13
+ - name: Sync Milestone
14
+ env:
15
+ GH_TOKEN: ${{ github.token }}
16
+ PR_NUMBER: ${{ github.event.pull_request.number }}
17
+ REPO: ${{ github.repository }}
18
+ OWNER: ${{ github.repository_owner }}
19
+ run: |
20
+ # 1. Get the milestone of the officially linked issues and the PR's current milestone via GraphQL
21
+ # This catches issues linked via "Fixes #123" and similar in the body or the UI sidebar.
22
+ API_RESPONSE=$(gh api graphql -f query='
23
+ query($owner: String!, $name: String!, $pr: Int!) {
24
+ repository(owner: $owner, name: $name) {
25
+ pullRequest(number: $pr) {
26
+ milestone {
27
+ number
28
+ }
29
+ closingIssuesReferences(first: 1) {
30
+ nodes {
31
+ milestone {
32
+ number
33
+ title
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }' -F owner="$OWNER" -F name="${REPO#*/}" -F pr=$PR_NUMBER)
40
+
41
+ MILESTONE_NUMBER=$(echo "$API_RESPONSE" | jq -r '.data.repository.pullRequest.closingIssuesReferences.nodes[0].milestone.number // "null"')
42
+ MILESTONE_TITLE=$(echo "$API_RESPONSE" | jq -r '.data.repository.pullRequest.closingIssuesReferences.nodes[0].milestone.title // "null"')
43
+ CURRENT_PR_MILESTONE=$(echo "$API_RESPONSE" | jq -r '.data.repository.pullRequest.milestone.number // "null"')
44
+
45
+ # 2. Check if a milestone was found
46
+ if [ "$MILESTONE_NUMBER" != "null" ] && [ -n "$MILESTONE_NUMBER" ]; then
47
+ if [ "$MILESTONE_NUMBER" = "$CURRENT_PR_MILESTONE" ]; then
48
+ echo "PR already has milestone '$MILESTONE_TITLE' set. No update needed."
49
+ else
50
+ echo "Found milestone '$MILESTONE_TITLE' from linked issue. Assigning to PR..."
51
+ gh pr edit $PR_NUMBER --milestone "$MILESTONE_TITLE" --repo "$REPO"
52
+ fi
53
+ else
54
+ echo "No milestone found on linked issues or no issues linked."
55
+ fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfmc-sdk",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Libarary to simplify SFMC requests with updated dependencies and less overhead",
5
5
  "main": "./lib/index.js",
6
6
  "exports": {
@@ -35,7 +35,7 @@
35
35
  "license": "BSD-3-Clause",
36
36
  "dependencies": {
37
37
  "axios": "^1.7.2",
38
- "fast-xml-parser": "5.5.6",
38
+ "fast-xml-parser": "5.5.9",
39
39
  "p-limit": "5.0.0"
40
40
  },
41
41
  "keywords": [
@@ -57,7 +57,7 @@
57
57
  "axios-mock-adapter": "2.1.0",
58
58
  "c8": "11.0.0",
59
59
  "chai": "6.2.2",
60
- "eslint": "10.0.3",
60
+ "eslint": "10.1.0",
61
61
  "eslint-config-prettier": "10.1.8",
62
62
  "eslint-plugin-jsdoc": "62.8.0",
63
63
  "eslint-plugin-mocha": "11.2.0",