mirror of
https://github.com/actions/add-to-project.git
synced 2025-12-13 05:27:56 +00:00
Compare commits
16 Commits
v0.6.0
...
camchenry/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c433aa66a | ||
|
|
34dcf61506 | ||
|
|
032c0af29a | ||
|
|
3c0dc2fb24 | ||
|
|
831555bfab | ||
|
|
23a466f0a1 | ||
|
|
a529082df9 | ||
|
|
3d28050eae | ||
|
|
df5516beff | ||
|
|
92dbc06e5d | ||
|
|
04b135066e | ||
|
|
d300992994 | ||
|
|
fdcca9b630 | ||
|
|
d18e1683af | ||
|
|
e589e53cb5 | ||
|
|
4c39393a8d |
21
.github/workflows/check-dist.yml
vendored
21
.github/workflows/check-dist.yml
vendored
@@ -15,6 +15,11 @@ on:
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
|
|
||||||
|
env:
|
||||||
|
# A pipe-separated array of files to ignore when comparing the expected and actual dist/ directories,
|
||||||
|
# which are used as a regular expression filter in the `grep` command.
|
||||||
|
FILES_TO_IGNORE: 'index.js.map|sourcemap-register.js'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-dist:
|
check-dist:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -38,15 +43,23 @@ jobs:
|
|||||||
|
|
||||||
- name: Compare the expected and actual dist/ directories
|
- name: Compare the expected and actual dist/ directories
|
||||||
run: |
|
run: |
|
||||||
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
|
# Get a list of files that are different between the checked-in dist/ directory and the generated dist/ directory,
|
||||||
echo "Detected uncommitted changes after build. See status below:"
|
# then trim the list to remove any leading or trailing whitespace.
|
||||||
git diff
|
CHANGED_FILES=$(git diff --ignore-space-at-eol --name-only dist/ | grep -vE "$FILES_TO_IGNORE" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
|
||||||
|
if [ -n "$CHANGED_FILES" ]; then
|
||||||
|
echo "❗️ Detected uncommitted changes after build (see diff output below)." >&2
|
||||||
|
echo "This indicates that the dist/ directory is out of sync with the checked-in index.js.\n" >&2
|
||||||
|
echo "⭐️ If the changes below are expected, run 'npm run build:compile && npm run build:package' and commit the output files." >&2
|
||||||
|
# Run `git diff` for each line/file in $CHANGED_FILES:
|
||||||
|
echo "$CHANGED_FILES" | xargs -I {} git diff --ignore-space-at-eol --text -- {}
|
||||||
exit 1
|
exit 1
|
||||||
|
else
|
||||||
|
echo "✅ No uncommitted changes detected after build."
|
||||||
fi
|
fi
|
||||||
id: diff
|
id: diff
|
||||||
|
|
||||||
# If index.js was different than expected, upload the expected version as an artifact
|
# If index.js was different than expected, upload the expected version as an artifact
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
|
|||||||
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -42,7 +42,7 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v3
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v2
|
uses: github/codeql-action/autobuild@v3
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
@@ -67,4 +67,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v3
|
||||||
|
|||||||
737
package-lock.json
generated
737
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -18,11 +18,11 @@
|
|||||||
"@typescript-eslint/parser": "^6.9.1",
|
"@typescript-eslint/parser": "^6.9.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
||||||
"@vercel/ncc": "^0.38.0",
|
"@vercel/ncc": "^0.38.0",
|
||||||
"concurrently": "^8.2.1",
|
"concurrently": "^8.2.2",
|
||||||
"eslint": "^8.49.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-plugin-github": "^4.10.0",
|
"eslint-plugin-github": "^4.10.0",
|
||||||
"eslint-plugin-jest": "^27.6.0",
|
"eslint-plugin-jest": "^27.6.0",
|
||||||
"eslint-plugin-prettier": "^5.0.0",
|
"eslint-plugin-prettier": "^5.1.3",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"prettier": "3.0.3",
|
"prettier": "3.0.3",
|
||||||
"ts-jest": "^29.1.1",
|
"ts-jest": "^29.1.1",
|
||||||
|
|||||||
@@ -117,6 +117,11 @@ export async function addToProject(): Promise<void> {
|
|||||||
if (issueOwnerName === projectOwnerName) {
|
if (issueOwnerName === projectOwnerName) {
|
||||||
core.info('Creating project item')
|
core.info('Creating project item')
|
||||||
|
|
||||||
|
if (issueOwnerName === 'github') {
|
||||||
|
console.log('this is a test')
|
||||||
|
throw new Error('test')
|
||||||
|
}
|
||||||
|
|
||||||
const addResp = await octokit.graphql<ProjectAddItemResponse>(
|
const addResp = await octokit.graphql<ProjectAddItemResponse>(
|
||||||
`mutation addIssueToProject($input: AddProjectV2ItemByIdInput!) {
|
`mutation addIssueToProject($input: AddProjectV2ItemByIdInput!) {
|
||||||
addProjectV2ItemById(input: $input) {
|
addProjectV2ItemById(input: $input) {
|
||||||
|
|||||||
Reference in New Issue
Block a user