Skip to content

Commit

Permalink
Merge branch 'release/2.2.0' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
titouanmathis committed Dec 10, 2020
2 parents 7c6900b + d966bf3 commit b5ea84d
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 9 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- run: npm run build

# @see https://github.com/actions/create-release/issues/38#issuecomment-715327220
# @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files
- name: Prepare the changelog from the tag message
id: prepare_changelog
run: |
Expand All @@ -32,6 +33,8 @@ jobs:
# Parse tag message
CHANGELOG=$(git tag -l --format='%(contents)' $GITHUB_REF | tail -n+3)
echo $CHANGELOG
# Set markdown titles
CHANGELOG=${CHANGELOG/Added/## Added}
CHANGELOG=${CHANGELOG/Fixed/## Fixed}
Expand All @@ -40,15 +43,20 @@ jobs:
CHANGELOG=${CHANGELOG/Deprecated/## Deprecated}
CHANGELOG=${CHANGELOG/Security/## Security}
echo $CHANGELOG
# Remove PGP signature
CHANGELOG="${CHANGELOG%-----BEGIN*}"
echo $CHANGELOG
# Change linebreaks and other special characters
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
echo "Setting changelog body to\n\n$CHANGELOG\n"
echo "Setting changelog body to:"
echo $CHANGELOG
echo 'changelog<<EOF' >> $GITHUB_ENV
echo $CHANGELOG >> $GITHUB_ENV
Expand All @@ -62,8 +70,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: v${{ env.GITHUB_ENV.release_version }}
body: ${{ env.GITHUB_ENV.changelog }}
release_name: v${{ env.release_version }}
body: ${{ env.changelog }}
draft: false
prerelease: false

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ jj s=<STATUS>

# Filter by sprint status
jj sp=<SPRINT_STATUS>

# Filter by Tempo account name (requires Tempo)
jj a=<ACCOUNT_NAME>
```
12 changes: 12 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@
## Config

Test config by connecting to the API.


## Compatibility information

Minimal Node JS version is 11 because of the usage of the `Array.prototype.flat` method. See https://node.green/#ES2019-features-Array-prototype--flat--flatMap-.


## Multiple action when selecting an issue

- Start a timer with @studiometa/cli-timer (press ⌥+⏎)
- Open issue
- Change status
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alfred-jira-search",
"version": "2.1.2",
"version": "2.2.0",
"description": "Alfred workflow to quickly search through your Jira issues",
"main": "index.js",
"scripts": {
Expand All @@ -12,7 +12,8 @@
"version:plist": "sed -i '' \"s#<string>$npm_package_version</string>#<string>$VERSION</string>#\" ./src/info.plist",
"build": "cd src/ && npm ci && zip -r ../alfred-jira-search.alfredworkflow .",
"prepublishOnly": "npm run build",
"postinstall": "if [ -n \"$npm_config_global\" ]; then open alfred-jira-search.alfredworkflow; fi;"
"postinstall": "if [ -n \"$npm_config_global\" ]; then open alfred-jira-search.alfredworkflow; fi;",
"dev": "ln -s $(pwd)/src $(cat ~/Library/Application\\ Support/Alfred/prefs.json | jq -r '.current')/workflows/dev-alfred-jira-search"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -47,6 +48,6 @@
"prettier": "^2.0.5"
},
"engines": {
"node": ">=8"
"node": ">=11"
}
}
2 changes: 1 addition & 1 deletion src/info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ When using the `jj` command, some smart filtering can be done:
<key>variablesdontexport</key>
<array/>
<key>version</key>
<string>2.1.2</string>
<string>2.2.0</string>
<key>webaddress</key>
<string>https://www.titouanmathis.com</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alfred-jira-search",
"version": "2.1.2",
"version": "2.2.0",
"homepage": "https://github.com/titouanmathis/alfred-jira-search",
"dependencies": {
"axios": "^0.21.0",
Expand Down
1 change: 1 addition & 0 deletions src/update-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const fields = [
'timeestimate',
'updated',
'customfield_10006',
'io.tempo.jira__account',
].join(',');

const MAX_RESULTS = 100;
Expand Down
7 changes: 6 additions & 1 deletion src/utils/format-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ module.exports = (config, issues) =>
}
}

return `p=${project} u=${assignee} s=${fields.status.name} ${sprint} ${key} ${fields.summary}`;
let account = '';
if (fields['io.tempo.jira__account'] && fields['io.tempo.jira__account'].value) {
account = `a=${fields['io.tempo.jira__account'].value}`;
}

return `p=${project} u=${assignee} s=${fields.status.name} ${account} ${sprint} ${key} ${fields.summary}`;
},
}));

0 comments on commit b5ea84d

Please sign in to comment.