Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions path/to/.github/workflows/RunIssueSentinel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Define a workflow to run the issue sentinel
name: Run issue sentinel

on:
issues:
types: [opened, edited, closed]

jobs:
Issue:
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- name: Run Issue Sentinel
uses: Azure/issue-sentinel@v1
with:
# Define a function to analyze an issue
analyze_issue: |
import os
import requests
import json
import traceback

def analyze_issue(issue):
try:
# Get the issue title and description
title = issue['title']
description = issue['description']

# Check if the issue is related to silent breaking changes or unverifiable remote code
if 'silent breaking change' in title.lower() or 'unverifiable remote code' in description.lower():
return True
else:
return False
except Exception as e:
print(f"Error analyzing issue: {e}")
return None

# Define a function to process regression feedback
process_regression_feedback: |
import os
import requests
import json
import traceback

def process_regression_feedback(feedback):
try:
# Get the feedback title and description
title = feedback['title']
description = feedback['description']

# Check if the feedback is related to silent breaking changes or unverifiable remote code
if 'silent breaking change' in title.lower() or 'unverifiable remote code' in description.lower():
return True
else:
return False
except Exception as e:
print(f"Error processing feedback: {e}")
return None
15 changes: 15 additions & 0 deletions path/to/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Office JavaScript APIs for Office Add-ins

Use Office.js and the Office Add-ins platform to build solutions that extend Office applications and interact with content in Office documents and in Outlook mail messages and calendar items. With Office Add-ins, you can use familiar web technologies such as HTML, CSS, and JavaScript to build solutions that can run in Office on the web, Windows, Mac, and mobile. You'll find walkthroughs, samples, and more information in the official [Office Add-ins documentation](https://learn.microsoft.com/office/dev/add-ins/).

## This repository

This GitHub repository is primarily used to report issues found in the Office JavaScript APIs. The npm package associated with this repository is no longer officially supported. Your add-in should get the JavaScript library from the Office content delivery network (CDN), as described in the section [Reference Office.js from the CDN](#reference-officejs-from-the-cdn). This ensures that essential product updates are served quickly to Office Add-ins.

## Report issues

If you believe you've found an issue (bug) with the Office JavaScript APIs, please visit the [issues tab](https://github.com/OfficeDev/office-js/issues) of this repo. If your issue is already reported, consider adding additional context or reproduction steps. Otherwise, select **New issue**, choose **Bug report**, and provide as much detail as possible. A member of our team will respond within 1-2 business days.

## Reference Office.js from the CDN

The Office CDN is the official supported source for Office Add-ins. Reference the Office.js library in the CDN by adding the following `<script>` tag within the `<head>` section of your HTML page.
16 changes: 16 additions & 0 deletions path/to/deployment.script/src/EnvironmentVariables.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Import necessary libraries
import * as os from 'os';

# Define a function to get the Office.js library version
export function getOfficeJsVersion(): string {
try {
// Get the Office.js library version from the environment variables
const officeJsVersion = os.environ['OFFICE_JS_VERSION'];

// Return the Office.js library version
return officeJsVersion;
} catch (error) {
// Return an error message if the Office.js library version is not found
return 'Error: Office.js library version not found';
}
}
21 changes: 21 additions & 0 deletions path/to/deployment.script/src/debug.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Import necessary libraries
import * as os from 'os';

# Define a function to debug the Office.js library
export function debugOfficeJs(): string {
try {
// Get the Office.js library version
const officeJsVersion = getOfficeJsVersion();

// Check if the Office.js library version is valid
if (officeJsVersion === 'Error: Office.js library version not found') {
return 'Error: Office.js library version not found';
} else {
// Return a success message
return 'Office.js library version: ' + officeJsVersion;
}
} catch (error) {
// Return an error message if an error occurs
return 'Error: ' + error.message;
}
}
25 changes: 25 additions & 0 deletions path/to/deployment.script/src/deployNpmPackage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Import necessary libraries
import * as os from 'os';
import * as fs from 'fs';

# Define a function to deploy the npm package
export function deployNpmPackage(): string {
try {
// Get the Office.js library version
const officeJsVersion = getOfficeJsVersion();

// Check if the Office.js library version is valid
if (officeJsVersion === 'Error: Office.js library version not found') {
return 'Error: Office.js library version not found';
} else {
// Deploy the npm package
fs.writeFileSync('package.json', '{"version": "' + officeJsVersion + '"}');

// Return a success message
return 'NPM package deployed successfully';
}
} catch (error) {
// Return an error message if an error occurs
return 'Error: ' + error.message;
}
}
16 changes: 16 additions & 0 deletions path/to/deployment.script/src/standardFile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Import necessary libraries
import * as fs from 'fs';

# Define a function to get the standard file
export function getStandardFile(): string {
try {
// Get the standard file
const standardFile = fs.readFileSync('standard.txt', 'utf8');

// Return the standard file
return standardFile;
} catch (error) {
// Return an error message if the standard file is not found
return 'Error: Standard file not found';
}
}
37 changes: 37 additions & 0 deletions path/to/issue-scripts/analyze_issue.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Import necessary libraries
import os
import requests
import json
import traceback

# Define a function to analyze an issue
def analyze_issue(issue):
try:
# Get the issue title and description
title = issue['title']
description = issue['description']

# Check if the issue is related to silent breaking changes or unverifiable remote code
if 'silent breaking change' in title.lower() or 'unverifiable remote code' in description.lower():
return True
else:
return False
except Exception as e:
print(f"Error analyzing issue: {e}")
return None

# Define a function to process regression feedback
def process_regression_feedback(feedback):
try:
# Get the feedback title and description
title = feedback['title']
description = feedback['description']

# Check if the feedback is related to silent breaking changes or unverifiable remote code
if 'silent breaking change' in title.lower() or 'unverifiable remote code' in description.lower():
return True
else:
return False
except Exception as e:
print(f"Error processing feedback: {e}")
return None