In order to properly select the message to be used, a small helper
function can help by deriving which tranlsation to use.
Updated the relevant feature spec to ensure the right tranlsation is
selected and the comment displayed in the Work Package activity matches
the expectation.
Following in line with the issue with Work Package references in
Pull Requests, all non-edge-case actions had the same situation of
defaulting to assuming the Author of the Pull Request is the one
performing the action.
Corrected by following the same wording pattern as reference messages.
Reworded the comment's description in order to fix the incorrectness
of itself and since it really isn't important information to know who
the user referencing the work package is (and because we don't keep track
of the provided `sender` in the webhook payload), we can do without it.
We now derive which should be the Github User attached to the Work Package
Activity Comment depending on what type of state the pull request was
in when the journal is saved.
- If the state was merged, use the `merged_by` user.
- Otherwise, use the author.
* Rename Git button to 'Git snippets'
* Change font for Github tab header
* Improve design of pr status badges
* Reorganize the design of PR headers
* Improve design of PR checks
* Improve design of git snippets menu
* Remove WP description from commit message and command
* Fix frontend specs for github integration
* Adding dots to the end of phrases.
* Github Integration: reduce dom depth. remove last border under PR
* Add target blank to PR details link & other fixes
* Fix work_package_github_tab_spec.rb
* Remove fdescribe
* Improve layout of Github pull requests tab header
* Add title to Github check icon
* Refactor classnames for github pull requests
This introduces `op-pull-request` and `op-pr-check` as BEM blocks, both in their own sass files, but the files still scoped to the pull request component.
* Fix frontend spec. Added karma Chrome debug config.
* Fix frontend specs after refactoring styles
Co-authored-by: Benjamin Bädorf <b.baedorf@openproject.com>
* WIP: prototype wiring up the API with the angular frontend
* little refactorings in namespace and loading logic
* frontend styling and polishing
* pairing with aleix
* Avoid empty pullRequest.githubUser to be displayed
* added feature specs, a workaround for a pr-reload-bug in angular, and some readme improvements
* Title for partial PRs added
* GitActionsMenuComponent tests
* Test improvements
* GitHubTabComponent tests
* TabHeaderComponent tests
* TabPrsComponent tests
* revert change to karma runner
* start styling
* i18n in component
* avoid container element
* git actions menu tests
* Github interfaces
* PullRequestComponent tests
* Comment removed
* Typings improvements
* Merge fixes
* Tests fixes
* fix: wp list id links working with tabs
* remove partial github pr state
A PR might still be incomplete but enough data can be pulled from a github issuee notification to fill in most of the information
* avoid duplicate spec
* Fix import paths of op-icon
Co-authored-by: Aleix Suau <info@macrofonoestudio.es>
Co-authored-by: ulferts <jens.ulferts@googlemail.com>
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
Sorry for introducing it, it was a false assumption about how work
package subjects are generated in the factory.
Turns out it is more stable and a better test to specify the subject we
test in the test setup itself anyways.
* Let GitHub integration show changes in a separate tab
* added new github integration icons to icon font
* add tab content: working tab-header and copy-menu
* modernise github_integrations ruby code
* refactored some code to be more modern ruby (if wrote most of it 7
years ago and couldn't look at some parts without squinting too much)
* make some intended-to-be-private module methods actually private
* fixed all rubocop errors in the /modules/github_integration
* re-organized tests a little
* gave our rubocop.yml some RSpec-related defaults -- happy to discuss
these, but I think we can live with these as a good starting point
👆 all without actually (intentionally) changing the behaviour
* removed dead angular template code
* codeclimate found more things than rubocop :)
* removed create-pr-button since we decided against implementing that feature
* added missing translations
* properly cache the github related part of the wp api
* lower case pull requests in translations
* fix specs